python – “Bad marshal data”Django开发服务器错误

前端之家收集整理的这篇文章主要介绍了python – “Bad marshal data”Django开发服务器错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

将数据导入MySQL数据库时出现此错误

ValueError at /admin/arbkdb/arbkcompany/
bad marshal data (unknown type code)
Request Method: GET
Request URL:    http://[2001:6f8:1c00:18b::2]:9000/admin/arbkdb/arbkcompany/
Django Version: 1.3
Exception Type: ValueError
Exception Value:    
bad marshal data (unknown type code)
Exception Location: /usr/lib/python2.7/dist-packages/simplejson/__init__.py in 

追溯

Environment:


Request Method: GET
Request URL: http://[2001:6f8:1c00:18b::2]:9000/admin/arbkdb/arbkcompany/

Django Version: 1.3
Python Version: 2.7.2
Installed Applications:
['admin_tools','admin_tools.theming','admin_tools.menu','admin_tools.dashboard','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.sites','django.contrib.messages','django.contrib.staticfiles','arbkdb','south','django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware','django.contrib.sessions.middleware.SessionMiddleware','django.middleware.csrf.CsrfViewMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/usr/lib/pymodules/python2.7/django/core/handlers/base.py" in get_response
  89.                     response = middleware_method(request)
File "/usr/lib/pymodules/python2.7/django/contrib/messages/middleware.py" in process_request
  11.         request._messages = default_storage(request)
File "/usr/lib/pymodules/python2.7/django/contrib/messages/storage/__init__.py" in 

PS.我不知道如何描述它为什么会出现这个错误,因为它在插入大量数据时会出现,我不知道为什么

这是我的模型数据
https://github.com/ardian/arbk/blob/master/arbkdb/models.py

最佳答案
看起来不是数据库问题,而是损坏的文件消息.删除* .pyc和* .pyo文件解决了这个问题.
原文链接:https://www.f2er.com/python/439289.html

猜你在找的Python相关文章