使用 python3.6 进行 Django 迁移错误:根:未找到哈希 sha3_224 的代码

2023-11-27

你好我读过Django 教程我有一个与特定相关的错误sha3_224迁移过程中的哈希函数。如何解决这个问题呢?谢谢。

(venv) linuxoid@linuxoid-ThinkPad-L540:~/myprojects/myproject$ python manage.py makemigrations
ERROR:root:code for hash sha3_224 was not found.
Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_sha3_224'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 128, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha3_224
ERROR:root:code for hash sha3_256 was not found.
Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_sha3_256'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 128, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha3_256
ERROR:root:code for hash sha3_384 was not found.
Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_sha3_384'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 128, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha3_384
ERROR:root:code for hash sha3_512 was not found.
Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_sha3_512'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 128, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha3_512
ERROR:root:code for hash shake_128 was not found.
Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_shake_128'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 128, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type shake_128
ERROR:root:code for hash shake_256 was not found.
Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 121, in __get_openssl_constructor
    f = getattr(_hashlib, 'openssl_' + name)
AttributeError: module '_hashlib' has no attribute 'openssl_shake_256'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 243, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 128, in __get_openssl_constructor
    return __get_builtin_constructor(name)
  File "/home/linuxoid/myprojects/venv/lib/python3.6/hashlib.py", line 113, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type shake_256
No changes detected

检查你的Python最近是否更新过。 venv 可能指向旧的,重新创建 venv 为我们修复了它。

Running mkvirtualenv venv or virtualenv venv(取决于您最初创建它的方式)也应该在保留已安装的软件包的同时工作。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 python3.6 进行 Django 迁移错误:根:未找到哈希 sha3_224 的代码 的相关文章

  • 表单输入框不显示

    我正在尝试使用 Django 显示一个简单的表单输入文本框 我正在亚马逊 AWS 上部署 该网站在不同的服务器 pythonanywhere 上运行良好 但在 AWS 上存在主要问题 具体来说 输入框没有被显示 我使用的模板如下 首页 ht
  • 在视图之间共享并在 AppConfig 中初始化的变量

    我想要一个在应用程序启动时初始化的变量 并且可以从视图访问该变量 my app my config py class WebConfig AppConfig name verbose name def ready self print lo
  • 如何覆盖 Django 中的默认用户模型字段?

    问题是默认的用户模型没有为字段提供一些非常有用的选项 例如唯一 真实到电子邮件字段 我读过这个问题 覆盖默认的用户模型方法 https stackoverflow com questions 1817244 django override
  • Django中的自动递增值

    我在 django 中有一个表并尝试自动递增它的序列号 在自定义模板中 for 循环用于变量 自定义模板 for i in getodeskview tr td 1 td td i odesk id td td i hours td td
  • 电子商务是否从头开始

    我需要开发一个包含电子商务部分的新网站 我来这里是想从你那里得到一些关于我应该走哪条路的提示 该网站将有一个静态部分 其中包括一些静态页面和用于销售产品的电子商务部分 我是 Django 和 PHP 开发人员 但这是我第一次需要开发电子商务
  • 当我这样做时什么也没有发生: python manage.py 命令

    我是 django 新手 目前正在学习主要教程 尽管它早些时候工作过 但当我执行 python manage py runserver 或 python manage py h 或使用任何其他命令时 shell 不会输出任何内容 想知道我做
  • 使用 django-rest-framework 设置对象级权限

    尝试使用 django rest framework 最干净 最规范地管理 django guardian 对象级权限 我想将对象的读取权限 module view object 分配给在执行 POST 时发出请求的用户 我的基于阶级的观点
  • 使用 django-social-auth 登录后获取 Facebook 数据

    我们已经建立了一个应用程序 使用django social auth使用 Facebook 验证用户身份的扩展 身份验证工作正常 但我们不清楚如何从 Facebook 获取有用信息 好友列表 点赞等 看起来django facebook处理
  • 在 field_name 中指定反向关系时,GeoDjango GeoQuerySet.distance() 会导致“ST_Distance 输出仅在 GeometryFields 上可用”

    从文档和其他问题来看 按距离对 GeoQuerySet 进行排序应该很简单 但我在让它工作时遇到了困难 下面通过一个例子来说明问题的情况 假设我在两个不同的应用程序中获得了两个模型 appA 中的一个模型和 appB 中的另一个模型定义如下
  • 如何使 Django ManyToMany “直通”查询更加高效?

    我使用的是 ManyToManyField 和 through 类 这会在获取事物列表时产生大量查询 我想知道是否有更有效的方法 例如 这里有一些描述书籍及其几位作者的简化类 它们通过角色类 定义 编辑器 插画家 等角色 class Per
  • (Django) AJAX 请求的 CSRF 验证在 Chrome 中工作,但在 Firefox 中不起作用

    正如标题所述 我的 Django CSRF 验证在 Chrome 中有效 但在 Firefox 中无效 我想知道原因 以便解决此问题 我已将此包含在head我的标签基本 html我的应用程序中的所有其他文件都从中扩展的文件 base htm
  • Django 和 AWS 简单电子邮件服务 [重复]

    这个问题在这里已经有答案了 我正在尝试启动并运行 django 站点 并且正在尝试启用 django 的标准密码重置服务 我的网站由 AWS EC2 托管 因此我想将 AWS SES 用于我的电子邮件服务 但是 我无法使 smtp 连接正常
  • Django 单元测试数据库没有被拆除?

    我编写了一些单元测试来测试我的 Django 应用程序 特别是一个测试套件中包含大量代码setUp 功能 所述代码的目的是为数据库创建测试数据 是的 我了解固定装置 并且选择在这种情况下不使用它们 当我运行单元测试套件时 运行的第一个测试通
  • 在 Django admin 中保存包含非 ASCII 字符的 ImageField 时出现 UnicodeEncodeError

    我试图在 django admin inlines 中上传图像文件 并在尝试上传文件名包含非 ascii 字符的文件时收到 UnicodeEncodeError File usr local lib python2 6 site packa
  • Django 表单中的只读字段

    如何在 Django 表单中将字段设置为只读 我知道如何禁用某个字段 但这不是我想要的 任何帮助 将不胜感激 您可以使用可选的attrs定义时的参数Field 以机智 somefield forms CharField widget for
  • 如何向 Django 表单添加表单控件?

    我尝试将表单控件添加到我为 Django 制作的表单应用程序中 我已经创建了该应用程序 并希望将表单添加到引导程序模板中 但是我不知道如何为我的电子邮件字段添加引导程序的更时尚的文本框 我希望最终得到类似于此引导模板一角的登录字段的内容 尽
  • 使用 pyinstaller 将 Django 移植到桌面应用程序

    我正在尝试将 django 项目转换为桌面应用程序 我已经下载了 pyinstaller 的开发人员版本 github pyinstaller pyinstaller hookutils py 修改如下 http www pyinstall
  • 没有数据库的 django 单元测试

    是否有可能在不设置数据库的情况下编写 django 单元测试 我想测试不需要数据库设置的业务逻辑 虽然设置数据库很快 但在某些情况下我真的不需要它 您可以子类化 DjangoTestSuiteRunner 并重写 setup databas
  • 序列化 Django Rest 框架时的附加字段

    我是 django 休息框架的新手 并创建了一个示例Employee model My 模型 py class Employees models Model created models DateTimeField auto now add
  • kombu.exceptions.EncodeError:用户不可 JSON 序列化

    我有 django 1 11 5 应用程序和 celery 4 1 0 我一直收到 kombu exceptions EncodeError

随机推荐

  • 告诉 Puppeteer 打开 Chrome 选项卡而不是窗口

    如果我打开了现有的 Google Chrome 窗口 我想告诉 puppeteer 打开一个新选项卡而不是打开一个新窗口 有没有办法做到这一点 是否有一些选项或标志我可以传递给木偶师来完成此任务 I have const puppeteer
  • 标准表单身份验证 Java servlet

    使用 Java Servlet 进行表单身份验证的标准方法是什么 从现在开始 我自己使用简单的 POST HTML 表单实现了这一点 根据数据库检查发送的参数 如果存在 将 User 对象保存到 HttpSession 中 检查每个 Ser
  • 解析 ANTLR 中的字符串插值

    我正在开发一个用于内部目的的简单字符串操作 DSL 并且我希望该语言能够支持 Ruby 中使用的字符串插值 例如 name Bob msg Hello name print msg prints Hello Bob 我正在尝试在 ANTLR
  • 证明在循环中使用范围运算符不会使用额外的内存

    当前的文档范围运算符 声明它不会消耗内存计数循环 范围运算符对于编写很有用foreach 1 10 循环以及对数组进行切片操作 在当前的实现中 没有创建临时数组当范围运算符用作 foreach 循环中的表达式时 但是当您编写如下内容时 旧版
  • WPF 将 StackPanel 的宽度从 0 动画到自动?

    我正在尝试在 StackPanel 的可见性从宽度 0 变为自动宽度时对其进行动画处理 这是我目前所拥有的
  • 使用 R 创建起点-终点矩阵

    我的数据框由个人和他们在某个时间点居住的城市组成 我想每年生成一个出发地 目的地矩阵 记录从一个城市到另一个城市的移动次数 我想知道 如何自动生成数据集中每年的出发地 目的地表 如何生成相同 5x5 格式的所有表格 5 是我的示例中的城市数
  • 基于 Spring-Boot 模块的集成测试

    我有一个多模块 Spring Boot 项目 我想知道如何设置集成测试来测试 Spring Data JPA 存储库 以下方法因此异常而失败 HV000183 无法加载 javax el E xpressionFactory 检查类路径上是
  • 致命错误 Varien_Autoload 未找到

    今天是个好日子 我使用示例数据安装了 magento 刷新了页面 一切似乎都正常 我的整个商店充满了样本数据 几分钟后我再次刷新 从那以后我不断收到此错误 PHP 致命错误 在第 53 行 var www vhosts shop cyber
  • libvlc 流屏幕的一部分

    我想使用 vlc 库流式传输屏幕的一部分 我写了一个小例子 include
  • DialogFragment 和 onDismiss

    我正在使用一个DialogFragment 我是这样展示的Activity DialogFragmentImage dialog DialogFragmentImage newInstance createBitmap dialog onD
  • 将 Java2D 保存为 SWF(闪存)

    我正在尝试将 Java2D 中绘制的矢量图像的输出保存到 SWF 文件中 有很多很棒的库可以将 java2D 输出保存为 SVG BATIK 和 PDF itext 等内容 但我找不到 SWF 库 有任何想法吗 我刚刚得到一个使用的示例雪碧
  • PHP:从链接标题中删除“http://”

    我有一个看起来像这样的字符串 string a href http google com http google com a 我怎样才能删除http 部分来自链接文本 但将其保留在 href 属性中 如果不使用完整的解析器 这可能在大多数情
  • 为什么 Rust 忽略 &str 的生命周期检查?

    fn main let strA a let result let strB abc result longest strA strB Will return strB println The longest string is resul
  • Aptana 1.5“svn:解决大小写错误”

    我今天安装了 Aptana 1 5 但是安装后 当我尝试提交 更新 修复等时 我的所有 SVN 项目都会出现这样的错误 Access is denied svn Error resolving case of C Users Brayn M
  • 如何添加标记 onClick 并在 google-maps-react 中显示我的地理位置?

    我在谷歌地图文档上发现了很多有用的信息 但在 html 中简单使用 js 以防万一react老实说我不明白 源代码 import React Component from react import Map InfoWindow Marker
  • C、C++、C#、Java 和 Python 中的声明、定义和初始化 [关闭]

    很难说出这里问的是什么 这个问题模棱两可 含糊不清 不完整 过于宽泛或言辞激烈 无法以目前的形式合理回答 如需帮助澄清此问题以便重新打开 访问帮助中心 上述每种语言中的术语含义是什么 为什么这些语言在这方面有所不同 无论它们在哪里 如果有的
  • Google 地图距离和方向 API 之间的区别

    Google 为 1 距离矩阵和 2 方向服务提供 API 我试图搜索1和2之间的区别 我的任务是 当用户从源移动S到目的地D使用某种路径 我们需要展示用户实际走过的路径 在谷歌地图上 实现它的最佳方法是什么 使用 1 距离矩阵 API 或
  • jQuery 自动完成:移动列表位置?

    我想知道是否可以将下拉列表向下移动 4px 我尝试过多种风格 ui autocomplete 包括 margin top 4px top 4px 但它似乎不起作用 接受的答案是不再有效因为the offset该选项在 jQuery UI v
  • 如何从控制台中的标准输入读取内容?

    我想从命令行读取标准输入 但我的尝试已经结束 程序在提示我输入之前就退出了 我正在寻找相当于控制台 ReadLine in C 这就是我目前所拥有的 package main import bufio fmt os func main re
  • 使用 python3.6 进行 Django 迁移错误:根:未找到哈希 sha3_224 的代码

    你好我读过Django 教程我有一个与特定相关的错误sha3 224迁移过程中的哈希函数 如何解决这个问题呢 谢谢 venv linuxoid linuxoid ThinkPad L540 myprojects myproject pyth