Soup Search "Bad magic number"
Soup Search "Bad magic number"
Whenever I run soup_search.py, I get the same error, which says "bad magic number in ..\soup_search_exe.pyc" I have tried Everything to fix this, including reinstalling python and Golly. What should I do?
Re: Soup Search "Bad magic number"
I am having this problem too. I have python 2.6.6, 2.5.4, and 2.6.2. Golly 2.2 (though I don't think this is the problem because it doesn't work with version 2.1 either).
- Nathaniel
- Site Admin
- Posts: 862
- Joined: December 10th, 2008, 3:48 pm
- Location: New Brunswick, Canada
- Contact:
Re: Soup Search "Bad magic number"
This is an error that occurs due to version number mish-mash with Python. Make sure that you are using either Python 2.6.0 or 2.6.2 -- other versions throw a (very cryptic) hissy-fit.
Re: Soup Search "Bad magic number"
I have version 2.6.2, and it is still giving me the error.
Re: Soup Search "Bad magic number"
But is that the version Golly is actually using? Check this by copying the following commands and then selecting File > Run Clipboard:I have version 2.6.2, and it is still giving me the error.
Code: Select all
import golly, sys
golly.note(sys.version)
the version numbers in the line that sets python_lib=...
Re: Soup Search "Bad magic number"
I changed it to 26 in gollyprefs, but now none of the scripts work. I searched for python*.dll, and it comes up with four files. two of those are python26.dll (the others are 25 and 24). One of the python26.dll files is stored in C:\Windows\System32, the other is stored in C:\Windows\Installer\$PatchCache$\Managed\024BAA4203E469447993E312F6D36EFA\2.6.2150
I tried copying both of these into the "could not load python library" window in golly, and neither of them work. Any ideas?
I tried copying both of these into the "could not load python library" window in golly, and neither of them work. Any ideas?
Re: Soup Search "Bad magic number"
Have you tried specifying the full path? Golly *should* be able to find just "python26.dll" but this fails for some people for reasons I've never been able to fathom (possibly because you have more than one Python installed). Edit GollyPrefs again (AFTER quitting Golly) and try either of these lines:
python_lib=C:\Windows\System32\python26.dll
python_lib=C:\Windows\Installer\$PatchCache$\Managed\024BAA4203E469447993E312F6D36EFA\2.6.2150\python26.dll
If those paths you've given are correct, and python26.dll exists in those locations, then Golly should have no problem loading the dll. If this doesn't work then I'm at a loss to figure out what is going wrong!
python_lib=C:\Windows\System32\python26.dll
python_lib=C:\Windows\Installer\$PatchCache$\Managed\024BAA4203E469447993E312F6D36EFA\2.6.2150\python26.dll
If those paths you've given are correct, and python26.dll exists in those locations, then Golly should have no problem loading the dll. If this doesn't work then I'm at a loss to figure out what is going wrong!
Re: Soup Search "Bad magic number"
I can't get it to work...there's probably something stupid I'm doing, and I doubt there's much chance it anyone being able to guess what it is.
Afterward, I installed python 2.7 (I had deleted all versions of python other than 2.6.2 during this attempt to get the soup search working), and that didn't work either (though that could just be because the scripts included with golly were meant for earlier versions of python). So I went back and redownloaded the version I had been using, 2.5.4, and changed gollyprefs back to python25.dll, and it works perfectly, EXCEPT for the soup search. I appreciate the help you gave me, and I doubt there's anything you could figure out without actually seeing my PC. I suppose I could wait and see if the next version of golly gives me the same weird bug...
Afterward, I installed python 2.7 (I had deleted all versions of python other than 2.6.2 during this attempt to get the soup search working), and that didn't work either (though that could just be because the scripts included with golly were meant for earlier versions of python). So I went back and redownloaded the version I had been using, 2.5.4, and changed gollyprefs back to python25.dll, and it works perfectly, EXCEPT for the soup search. I appreciate the help you gave me, and I doubt there's anything you could figure out without actually seeing my PC. I suppose I could wait and see if the next version of golly gives me the same weird bug...