ImportError: cannot import name 'SKIP_ADMIN_LOG' from 'import_export.admin'
来源:3-7 xadmin后台管理系统的配置
天才在左_我在右
2021-06-11
给后来人!!
Django2.2.24
python3.8.x
在使用xadmin报错,xadmin复制老师的。
报错信息:
......
File "D:\AceMyProject\mxshop\mxshop\libs\xadmin\plugins\__init__.py", line 42, in <listcomp>
[import_module('xadmin.plugins.%s' % plugin) for plugin in PLUGINS if plugin not in exclude_plugins]
File "e:\python380\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "D:\AceMyProject\mxshop\mxshop\libs\xadmin\plugins\importexport.py", line 48, in <module>
from import_export.admin import DEFAULT_FORMATS, SKIP_ADMIN_LOG, TMP_STORAGE_CLASS
ImportError: cannot import name 'SKIP_ADMIN_LOG' from 'import_export.admin' (C:\Users\Admin\Envs\github\lib\site-packages\import_export\admin.py)
解决办法:
…\xadmin\plugins\importexport.py
# from import_export.admin import DEFAULT_FORMATS, SKIP_ADMIN_LOG, TMP_STORAGE_CLASS
from import_export.admin import DEFAULT_FORMATS, ImportMixin, ImportExportMixinBase
写回答
2回答
-
敌不动_我不动
2022-06-15
咱俩用的版本差不错,有没有遇见过这个问题
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 9737: illegal multibyte sequence
022022-06-15 -
橡果国际oil
2021-06-17
万分感谢!!!!
后面两个直接删了好像也行,不过你加上后面两个是干啥用的
00
Python前后端分离开发Vue+Django REST framework实战
Django REST framework课程视频,RESTFul API前后端分离开发
2873 学习 · 2457 问题
相似问题