当前位置:网站首页>Ioerror: no translation files found for default language zh cn Solutions for
Ioerror: no translation files found for default language zh cn Solutions for
2022-06-22 02:23:00 【Menon research monk】
1. The problem is shown in
start-up python When it comes to the project , The display service cannot be opened , The error log shows the following problems
The following problems occurred :
File "/home/cc/.virtualenvs/audioadmin/local/lib/python2.7/site-packages/django/utils/functional.py", line 162, in __mod__
return six.text_type(self) % rhs
File "/home/cc/.virtualenvs/audioadmin/local/lib/python2.7/site-packages/django/utils/functional.py", line 119, in __text_cast
return func(*self.__args, **self.__kw)
File "/home/cc/.virtualenvs/audioadmin/local/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 89, in ugettext
return _trans.ugettext(message)
File "/home/cc/.virtualenvs/audioadmin/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 345, in ugettext
return do_translate(message, 'ugettext')
File "/home/cc/.virtualenvs/audioadmin/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 321, in do_translate
_default = _default or translation(settings.LANGUAGE_CODE)
File "/home/cc/.virtualenvs/audioadmin/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 228, in translation
_translations[language] = DjangoTranslation(language)
File "/home/cc/.virtualenvs/audioadmin/local/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 134, in __init__
raise IOError("No translation files found for default language %s." % settings.LANGUAGE_CODE)
IOError: No translation files found for default language zh-cn.
unable to load app 0 (mountpoint='') (callable not found or import error)
Traceback (most recent call last):
The screenshot is as follows :
2. Problem analysis
Find the key error causes through the error log
IOError: No translation files found for default language zh-cn.
I can't find this Chinese package ( My project is a virtual environment that runs on the server , You can also see from the error log )
But I usually use it well , Why can't I use this bag suddenly
Since it can't be used , The small solution is to change to a Chinese package
stay base.py You can change it by setting the package name in ( In itself, these registrations exist django The path of )
- Simplified Chinese :zh-Hans
- Traditional Chinese :zh-Hant
If not , Direct replacement of items Django package , Because maybe this package does not exist in this version ( It can be used without affecting the compilation of the whole project )
( Colleagues also changed their bags , Cause my side to affect , So my solution is to go back to that Django Version of )
3. resolvent
Find... Throughout the project LANGUAGE_CODE, Replace it with Django Some packages in the project 
It can be replaced by zh-Hans , Recompile successfully
The other way is : Replace Django edition , After all, some versions do not have these packages
边栏推荐
- Zhongang Mining Co., Ltd.: fluorite is a scarce resource with enhanced attributes, and there may be a gap between supply and demand in the future
- In 2022, the number of mobile banking users in Q1 will reach 650million, and ESG personal financial product innovation will be strengthened
- EMC Radiation Emission rectification - principle Case Analysis
- 微信小程序影视评论交流平台系统毕业设计毕设(4)开题报告
- Atguigu---- collect form data
- 学习过的课程
- Right alignment of MathType formula right number in word
- Get to know unity3d (project structure, third-party plug-in of probuilder)
- Cmake common command category notes
- What does the redemption confirmation date of financial products mean?
猜你喜欢

剑指offer 26:树的子结构

Development of power plant compliance test system with LabVIEW
![[Chapter 26 medical impact segmentation system based on minimum error method and region growth -- matlab deep learning practical GUI project]](/img/19/18dcc8ed017541d91c52550f48923c.png)
[Chapter 26 medical impact segmentation system based on minimum error method and region growth -- matlab deep learning practical GUI project]

Mysql database easy learning 06 - commonly used by data analysts: single table query of data query language DQL

An error occurs when Android uses the SQL database to login. Attempt to invoke virtual method '' on a null object reference
![LeetCode 513 找树左下角的值[BFS 二叉树] HERODING的LeetCode之路](/img/15/b406e7bf1b83cbdd685c8cde427786.png)
LeetCode 513 找树左下角的值[BFS 二叉树] HERODING的LeetCode之路

A short video costs hundreds of thousands of yuan, and the virtual digital man makes a circle with "strength"

小孩子学什么编程?

Brief introduction to common pigtails of communication pigtails

Introduction to Apache ActiveMQ Artemis
随机推荐
优秀的 Verilog/FPGA开源项目介绍(二十七)- 小型CPU
Linxu modify the permissions of the folder so that everyone can access 777
Creating and extending XFS file system based on LVM
C # judge whether the application is started and displayed
Wechat applet film and television comment exchange platform system graduation design (3) background function
Fabric. JS iText set italics manually
Array common methods
论文笔记: 多标签学习 ACkEL
Chrome browser cancel input box to record form input history
Matlab learning notes (4) matlab array
创建rt_thread线程
Games-101 personal summary rasterization
Brief introduction to common pigtails of communication pigtails
Get to know unity3d (project structure, third-party plug-in of probuilder)
atguigu----列表渲染
Mysql database easy learning 09 - commonly used by data analysts: multi table query of data query language DQL
Idea ---- copy and paste
Using OKR for HR digital transformation
微信小程序影视评论交流平台系统毕业设计毕设(1)开发概要
2022钎焊考试模拟100题及答案