Soup Search "Bad magic number"

Has something gone haywire? Let us know about it!
Post Reply
pyfgcrl
Posts: 2
Joined: February 11th, 2011, 3:37 am

Soup Search "Bad magic number"

Post by pyfgcrl » February 11th, 2011, 3:40 am

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?

137ben
Posts: 343
Joined: June 18th, 2010, 8:18 pm

Re: Soup Search "Bad magic number"

Post by 137ben » February 13th, 2011, 9:21 pm

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).

User avatar
Nathaniel
Site Admin
Posts: 574
Joined: December 10th, 2008, 3:48 pm
Location: New Brunswick, Canada
Contact:

Re: Soup Search "Bad magic number"

Post by Nathaniel » February 17th, 2011, 12:46 am

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.

137ben
Posts: 343
Joined: June 18th, 2010, 8:18 pm

Re: Soup Search "Bad magic number"

Post by 137ben » February 17th, 2011, 5:33 pm

I have version 2.6.2, and it is still giving me the error.

User avatar
Andrew
Moderator
Posts: 769
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Soup Search "Bad magic number"

Post by Andrew » February 17th, 2011, 5:46 pm

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=...

137ben
Posts: 343
Joined: June 18th, 2010, 8:18 pm

Re: Soup Search "Bad magic number"

Post by 137ben » February 17th, 2011, 8:40 pm

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?

User avatar
Andrew
Moderator
Posts: 769
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia
Contact:

Re: Soup Search "Bad magic number"

Post by Andrew » February 17th, 2011, 10:03 pm

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!

137ben
Posts: 343
Joined: June 18th, 2010, 8:18 pm

Re: Soup Search "Bad magic number"

Post by 137ben » February 18th, 2011, 10:52 pm

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...

Post Reply