Page 1 of 1

Soup Search "Bad magic number"

Posted: February 11th, 2011, 3:40 am
by pyfgcrl
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"

Posted: February 13th, 2011, 9:21 pm
by p46beth
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).

Re: Soup Search "Bad magic number"

Posted: February 17th, 2011, 12:46 am
by Nathaniel
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"

Posted: February 17th, 2011, 5:33 pm
by p46beth
I have version 2.6.2, and it is still giving me the error.

Re: Soup Search "Bad magic number"

Posted: February 17th, 2011, 5:46 pm
by Andrew
I have version 2.6.2, and it is still giving me the error.
But is that the version Golly is actually using? Check this by copying the following commands and then selecting File > Run Clipboard:

Code: Select all

import golly, sys
golly.note(sys.version)
If Golly isn't using 2.6.2 then quit Golly, edit your GollyPrefs file (see bottom of Help > File Menu for its location) and change
the version numbers in the line that sets python_lib=...

Re: Soup Search "Bad magic number"

Posted: February 17th, 2011, 8:40 pm
by p46beth
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?

Re: Soup Search "Bad magic number"

Posted: February 17th, 2011, 10:03 pm
by Andrew
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!

Re: Soup Search "Bad magic number"

Posted: February 18th, 2011, 10:52 pm
by p46beth
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...