The list of all magic numbers can be found in Python/import.c, reproduced here for completeness (current as at the time the answer was posted, has changed since then): 1. You should check the actual full stack trace when the import fails.Īs an aside, the first word of all my 2.5.1(r251:54863) pyc files is 62131, 2.6.1(r261:67517) is 62161. It's highly unlikely it would import sometimes. The pyc that's causing the problem may only be imported under certain conditions. International Television Production Nederland BV, Free Association. One thing that might be causing the intermittent nature. Magic Mikes Last Dance is loose and limber enough to entertain, although its hard. If they are not yours, and the original py files are not provided, you'll have to either get the py files for re-compilation, or use an interpreter that can run the pyc files with that particular magic value. On UNIX type systems, that could be something as simple as: rm *.pyc If they are your pyc files (or you have the py files for them), just delete them and let the interpreter re-compile the py files. This includes editing the pyc file or trying to run a pyc from a different version of python (usually later) than your interpreter. Then the python interpreter makes sure this number is correct when loading it.Īnything that damages this magic number will cause your problem. Python puts a similar marker into its pyc files when it creates them. The magic number comes from UNIX-type systems where the first few bytes of a file held a marker indicating the file type.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |