gpt4 book ai didi

python - 找不到数据文件,在 confusable_homoglyphs/categories.py 中生成数据文件失败

转载 作者:太空宇宙 更新时间:2023-11-03 14:50:05 25 4
gpt4 key购买 nike

我正在 apache 服务器上建立一个 django 项目。在使用 manage.py runsslserver 的情况下,它在我的 PC 上运行良好。

当我加载到 apache 服务器上时,我可以运行 manage.py migratecollectstatic 以及一些安装程序。

但是当我尝试进入网页时,我收到错误消息“找不到数据文件,数据文件生成失败”,并带有此回溯:

Environment:


Request Method: GET
Request URL: https://ekim.hexiawebservices.co.uk/

Django Version: 1.11.5
Python Version: 2.7.12
Installed Applications:
['django.contrib.admin',
'registration',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'social_django',
'djangosecure',
'sslserver',
'ekim']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback:

File "/var/www/ekim/env/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)

File "/var/www/ekim/env/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
172. resolver_match = resolver.resolve(request.path_info)

File "/var/www/ekim/env/lib/python2.7/site-packages/django/urls/resolvers.py" in resolve
362. for pattern in self.url_patterns:

File "/var/www/ekim/env/lib/python2.7/site-packages/django/utils/functional.py" in __get__
35. res = instance.__dict__[self.name] = self.func(instance)

File "/var/www/ekim/env/lib/python2.7/site-packages/django/urls/resolvers.py" in url_patterns
405. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

File "/var/www/ekim/env/lib/python2.7/site-packages/django/utils/functional.py" in __get__
35. res = instance.__dict__[self.name] = self.func(instance)

File "/var/www/ekim/env/lib/python2.7/site-packages/django/urls/resolvers.py" in urlconf_module
398. return import_module(self.urlconf_name)

File "/usr/lib/python2.7/importlib/__init__.py" in import_module
37. __import__(name)

File "/var/www/ekim/ekim/urls.py" in <module>
30. url(r'^accounts/', include('registration.backends.hmac.urls')),

File "/var/www/ekim/env/lib/python2.7/site-packages/django/conf/urls/__init__.py" in include
50. urlconf_module = import_module(urlconf_module)

File "/usr/lib/python2.7/importlib/__init__.py" in import_module
37. __import__(name)

File "/var/www/ekim/env/lib/python2.7/site-packages/registration/backends/hmac/urls.py" in <module>
10. from . import views

File "/var/www/ekim/env/lib/python2.7/site-packages/registration/backends/hmac/views.py" in <module>
15. from registration.views import ActivationView as BaseActivationView

File "/var/www/ekim/env/lib/python2.7/site-packages/registration/views.py" in <module>
12. from registration.forms import RegistrationForm

File "/var/www/ekim/env/lib/python2.7/site-packages/registration/forms.py" in <module>
19. from . import validators

File "/var/www/ekim/env/lib/python2.7/site-packages/registration/validators.py" in <module>
10. from confusable_homoglyphs import confusables

File "/var/www/ekim/env/lib/python2.7/site-packages/confusable_homoglyphs/confusables.py" in <module>
7. from .categories import unique_aliases, alias

File "/var/www/ekim/env/lib/python2.7/site-packages/confusable_homoglyphs/categories.py" in <module>
147. raise Exception('Datafile not found, datafile generation failed!')

Exception Type: Exception at /
Exception Value: Datafile not found, datafile generation failed!

我已经尝试对此进行排序 3 个小时,但无法解决。非常感谢任何帮助。

最佳答案

(我无法对这个问题发表评论,因为我没有足够的业力。)

你遇到这个错误是因为你依赖我写的一个库。每当第一次加载时,它都会从 unicode.org 下载一些文件。不幸的是,我没有预料到一些用例,例如使用我的库部署应用程序作为平台即服务的依赖项,依赖项会经常被下载,这也会导致我的库访问 unicode.org 比我预期的要频繁得多。

幸运的是,有人向库提交了一个补丁,彻底解决了这个问题。请升级到 confusable_homoglyphs>=3.0.0。 :)

关于python - 找不到数据文件,在 confusable_homoglyphs/categories.py 中生成数据文件失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46512148/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com