c:\DemoBlog\blog_system>manage.py syncdb
Traceback (most recent call last):
File "C:\DemoBlog\blog_system\manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
399, in execute_from_command_line
utility.execute()
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python34\lib\site-packages\django\core\management\base.py", line 242,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python34\lib\site-packages\django\core\management\base.py", line 280,
in execute
translation.activate('en-us')
File "C:\Python34\lib\site-packages\django\utils\translation\__init__.py", lin
e 130, in activate
return _trans.activate(language)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 188, in activate
_active.value = translation(language)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 159, in _fetch
app = import_module(appname)
File "C:\Python34\lib\importlib\__init__.py", line 104, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2231, in _gcd_import
File "", line 2214, in _find_and_load
File "", line 2189, in _find_and_load_unlocked
File "", line 321, in _call_with_frames_removed
File "", line 2231, in _gcd_import
File "", line 2214, in _find_and_load
File "", line 2203, in _find_and_load_unlocked
File "", line 1200, in _load_unlocked
File "", line 1129, in _exec
File "", line 1448, in exec_module
File "", line 321, in _call_with_frames_removed
File "C:\Python34\lib\site-packages\file_picker\__init__.py", line 4, in
from file_picker.views import FilePickerBase, ImagePickerBase
File "C:\Python34\lib\site-packages\file_picker\views.py", line 73
except Exception, e:
^
SyntaxError: invalid syntax
< /code>
Я понятия не имею, в чем проблема. Но когда я очищаю свои настройки.py < /p>
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'file_picker',
'file_picker.uploads',
'file_picker.wymeditor',
'bootstrap_toolkit',
'blog',
)
And pull off everything that connected with file picker and bootstrap - it works, help me please
......................................................................................................................................................................................
I Исправлено, за исключением исключения как e < /code>
, чем я попробовал еще раз - он показал < /p>
c:\DemoBlog\blog_system>manage.py syncdb
C:\Python34\lib\importlib\_bootstrap.py:321: DeprecationWarning: django.utils.si
mplejson is deprecated; use json instead.
return f(*args, **kwds)
Traceback (most recent call last):
File "C:\DemoBlog\blog_system\manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
399, in execute_from_command_line
utility.execute()
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python34\lib\site-packages\django\core\management\base.py", line 242,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python34\lib\site-packages\django\core\management\base.py", line 280,
in execute
translation.activate('en-us')
File "C:\Python34\lib\site-packages\django\utils\translation\__init__.py", lin
e 130, in activate
return _trans.activate(language)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 188, in activate
_active.value = translation(language)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 159, in _fetch
app = import_module(appname)
File "C:\Python34\lib\importlib\__init__.py", line 104, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2231, in _gcd_import
File "", line 2214, in _find_and_load
File "", line 2189, in _find_and_load_unlocked
File "", line 321, in _call_with_frames_removed
File "", line 2231, in _gcd_import
File "", line 2214, in _find_and_load
File "", line 2203, in _find_and_load_unlocked
File "", line 1200, in _load_unlocked
File "", line 1129, in _exec
File "", line 1448, in exec_module
File "", line 321, in _call_with_frames_removed
File "C:\Python34\lib\site-packages\file_picker\__init__.py", line 4, in
from file_picker.views import FilePickerBase, ImagePickerBase
File "C:\Python34\lib\site-packages\file_picker\views.py", line 17, in
from sorl.thumbnail.main import DjangoThumbnail
File "C:\Python34\lib\site-packages\sorl\thumbnail\main.py", line 4, in
from django.utils.encoding import iri_to_uri, force_unicode
ImportError: cannot import name 'force_unicode'
< /code>
.................................................................................................................................................................................................................br /> Перед установкой Sorl-Teanail, мне пришлось установить некоторые требования в качестве Redis, Pillow, Pgmagick и Wand. < /p>
Только я не смог установить pgmagick - вот ошибка < /p>
C:\Users\www>pip install pgmagick
Downloading/unpacking pgmagick
Downloading pgmagick-0.5.7.tar.gz
Running setup.py (path:C:\TEMP\pip_build_www\pgmagick\setup.py) egg_info for p
ackage pgmagick
Traceback (most recent call last):
File "", line 17, in
File "C:\TEMP\pip_build_www\pgmagick\setup.py", line 74, in
raise Exception("Magick++ not found")
Exception: Magick++ not found
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 17, in
File "C:\TEMP\pip_build_www\pgmagick\setup.py", line 74, in
raise Exception("Magick++ not found")
Exception: Magick++ not found
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in C:\TEMP\pip_build_w
ww\pgmagick
Storing debug log for failure in C:\Users\www\pip\pip.log
< /code>
...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................c:\site>manage.py syncdb
C:\Python34\lib\importlib\_bootstrap.py:321: DeprecationWarning: django.utils.si
mplejson is deprecated; use json instead.
return json
Traceback (most recent call last):
File "C:\site\manage.py", line 10, in
execute_from_command_line(sys.argv)
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
399, in execute_from_command_line
utility.execute()
File "C:\Python34\lib\site-packages\django\core\management\__init__.py", line
392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python34\lib\site-packages\django\core\management\base.py", line 242,
in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python34\lib\site-packages\django\core\management\base.py", line 280,
in execute
translation.activate('en-us')
File "C:\Python34\lib\site-packages\django\utils\translation\__init__.py", lin
e 130, in activate
return _trans.activate(language)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 188, in activate
_active.value = translation(language)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 177, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "C:\Python34\lib\site-packages\django\utils\translation\trans_real.py", l
ine 159, in _fetch
app = import_module(appname)
File "C:\Python34\lib\importlib\__init__.py", line 104, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 2231, in _gcd_import
File "", line 2214, in _find_and_load
File "", line 2189, in _find_and_load_unlocked
File "", line 321, in _call_with_frames_removed
File "", line 2231, in _gcd_import
File "", line 2214, in _find_and_load
File "", line 2203, in _find_and_load_unlocked
File "", line 1200, in _load_unlocked
File "", line 1129, in _exec
File "", line 1448, in exec_module
File "", line 321, in _call_with_frames_removed
File "C:\Python34\lib\site-packages\file_picker\__init__.py", line 4, in
from file_picker.views import FilePickerBase, ImagePickerBase
File "C:\Python34\lib\site-packages\file_picker\views.py", line 17, in
from sorl.thumbnail.main import DjangoThumbnail
ImportError: No module named 'sorl.thumbnail.main'
Подробнее здесь: https://stackoverflow.com/questions/236 ... cker-error
Не могу создать базу данных с помощью Manage.py Syncdb из -за ошибки File_picker ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Есть ли разница между «file.readlines()», «list(file)» и «file.read().splitlines(True)»?
Anonymous » » в форуме Python - 0 Ответы
- 157 Просмотры
-
Последнее сообщение Anonymous
-