python、django的错误与报错总结

1.   # -*- coding: utf-8 -*-  头不识别中文路径,要换成  # -*- coding: gb18030 -*-  就可以识别代码中的中文了


2.   ImportError: has no 'check_packages' attribute

This error when you run buildout can be solved by upgrading setuptools as follows:

(plone3) $ easy_install -U setuptools


3.    异常信息如下:

ImportError: has no 'check_packages' attribute

解决办法:

curl -O http://python-distribute.org/distribute_setup.py 

sudo python distribute_setup.py


4.Make sure these are valid cron class names: ['mycrons.cron.CronFirstCharge', 'mycrons.cron.CronAnnouncement']

这个情况是因为django里面有错误,例如cron定时程序引用的模块中有中文且文件头没有包含 #-*- coding: UTF-8 -*- 

你可能感兴趣的:(python、django的错误与报错总结)