Page 1 of 1

Golly Crashes When Running Python Scripts

PostPosted: June 1st, 2016, 1:05 pm
by gnosis1123
I downloaded Python 2.7.8 for Windows 8 and tried to run a python script from Golly, but Golly immediately exits. Is this supposed to happen? Is the output not supposed to show up in the Golly interface?


Thank you.

Re: Golly Crashes When Running Python Scripts

PostPosted: June 1st, 2016, 1:39 pm
by dvgrn
gnosis1123 wrote:I downloaded Python 2.7.8 for Windows 8 and tried to run a python script from Golly, but Golly immediately exits. Is this supposed to happen? Is the output not supposed to show up in the Golly interface?

Definitely not supposed to happen. See this thread (amusingly named exactly the same as your new one) which links to a previous thread reporting a similar problem.

Can you please post whether you're running 32- or 64-bit Golly, and 32- or 64-bit Python? If you're seeing an instant crash-and-exit, it doesn't sound as if you're running mismatched versions of Golly and Python, but it's worth double-checking.

I don't recall that there have been many reported uses of Python scripts under Windows 8; Windows 7 and 10 seem to be more common. There's no particular reason that I know of that there would be a Windows-8-specific problem, but maybe that shouldn't be ruled out. Anyone else running Golly+Python on Windows 8 successfully?

If you want to do some really helpful troubleshooting, you could try digging into the Windows registry on your system, and see if the registry keys described in the Python installer bug report are present on your computer, and if the problem goes away when you edit those keys. (Really only the 2.7.11 Python installer should cause that problem, as far as I know, though, so this line of investigation probably isn't worth spending _too_ much time on.)

Official Disclaimer: Changes to the Windows registry should only be done by courageous people with reasonably good backups; no one associated with conwaylife.com should be held responsible if your computer suddenly won't boot up properly. There's no particular reason that that kind of thing should happen if you just edit Python-related registry keys, but that doesn't mean that something annoying _won't_ happen...!

Re: Golly Crashes When Running Python Scripts

PostPosted: June 2nd, 2016, 2:38 am
by Sphenocorona
I've used Python scripts in golly on Windows 8.1 just fine, 64 bit system but I do not remember if the two are both 64 bit or 32 bit.

Re: Golly Crashes When Running Python Scripts

PostPosted: June 3rd, 2016, 11:59 am
by gnosis1123
dvgrn wrote:
gnosis1123 wrote:I downloaded Python 2.7.8 for Windows 8 and tried to run a python script from Golly, but Golly immediately exits. Is this supposed to happen? Is the output not supposed to show up in the Golly interface?

Definitely not supposed to happen. See this thread (amusingly named exactly the same as your new one) which links to a previous thread reporting a similar problem.

Can you please post whether you're running 32- or 64-bit Golly, and 32- or 64-bit Python? If you're seeing an instant crash-and-exit, it doesn't sound as if you're running mismatched versions of Golly and Python, but it's worth double-checking.

I don't recall that there have been many reported uses of Python scripts under Windows 8; Windows 7 and 10 seem to be more common. There's no particular reason that I know of that there would be a Windows-8-specific problem, but maybe that shouldn't be ruled out. Anyone else running Golly+Python on Windows 8 successfully?

If you want to do some really helpful troubleshooting, you could try digging into the Windows registry on your system, and see if the registry keys described in the Python installer bug report are present on your computer, and if the problem goes away when you edit those keys. (Really only the 2.7.11 Python installer should cause that problem, as far as I know, though, so this line of investigation probably isn't worth spending _too_ much time on.)

Official Disclaimer: Changes to the Windows registry should only be done by courageous people with reasonably good backups; no one associated with conwaylife.com should be held responsible if your computer suddenly won't boot up properly. There's no particular reason that that kind of thing should happen if you just edit Python-related registry keys, but that doesn't mean that something annoying _won't_ happen...!


Solved it. I was running 32-bit Windows with 32-bit Python 2.7.8. I upgraded to Windows 10 (64-bit) and tried Python 2.7.0 and the scripts work now. Thanks for the info.

Re: Golly Crashes When Running Python Scripts

PostPosted: June 3rd, 2016, 12:21 pm
by dvgrn
gnosis1123 wrote:Solved it. I was running 32-bit Windows with 32-bit Python 2.7.8. I upgraded to Windows 10 (64-bit) and tried Python 2.7.0 and the scripts work now.

Thanks for the update, and glad you got it working. Fishing for a few more specifics -- you had downloaded 32-bit Golly originally, I take it, and now you have 64-bit Golly? And what was the OS version for your 32-bit Windows?

We hadn't had any trouble with Python versions below 2.7.10 up until this point, as long as M=N for M-bit Golly and N-bit Python... so I'd like to have as much detail as possible, just in case this kind of thing comes up again.

Re: Golly Crashes When Running Python Scripts

PostPosted: June 3rd, 2016, 1:47 pm
by gnosis1123
dvgrn wrote:
gnosis1123 wrote:Solved it. I was running 32-bit Windows with 32-bit Python 2.7.8. I upgraded to Windows 10 (64-bit) and tried Python 2.7.0 and the scripts work now.

Thanks for the update, and glad you got it working. Fishing for a few more specifics -- you had downloaded 32-bit Golly originally, I take it, and now you have 64-bit Golly? And what was the OS version for your 32-bit Windows?

We hadn't had any trouble with Python versions below 2.7.10 up until this point, as long as M=N for M-bit Golly and N-bit Python... so I'd like to have as much detail as possible, just in case this kind of thing comes up again.


Yes sir. I had 32-bit for Windows 8 and 32-bit for Golly. I tried 32-bit for Python 2.7.8 and Golly couldn't load the Python library when I gave it the path to python27.dll. Then I tried the 64-bit version for Windows 10, Golly, and Python 2.7.0 and the majority of Python scripts work for me now.

For instance, draw-lines.py asks me to give the path to perl*.dll. After I hit cancel, the program still runs regardless. However, if I run metafier.py I get "Error: Golly.exe has stopped working". The other scripts run fine.

Honestly, I am not very good with computers. Maybe I'm not specifying the path correctly?

Golly is a wonderful program regardless.

Thank you.

Re: Golly Crashes When Running Python Scripts

PostPosted: June 3rd, 2016, 3:27 pm
by dvgrn
gnosis1123 wrote:... the majority of Python scripts work for me now.

For instance, draw-lines.py asks me to give the path to perl*.dll. After I hit cancel, the program still runs regardless. However, if I run metafier.py I get "Error: Golly.exe has stopped working". The other scripts run fine.

Honestly, I am not very good with computers. Maybe I'm not specifying the path correctly?

Nah, you're probably doing just fine. Using Python with Golly isn't supposed to be rocket science -- ordinarily it's a two-minute install and then it Just Works (you often don't have to put in a DLL path at all.) But the 32-bit vs. 64-bit issue tends to get a lot of people confused.

Will have to see if I can figure out what's going on with draw-lines.py -- offhand I don't remember seeing a problem like that before (though it's well documented that my memory has big holes in it here and there.)

The metafier.py problem, on the other hand, is very familiar, and I think we've got it fixed for Golly 2.8. In the meantime, here's a thread that describes a couple of possible workarounds. If that doesn't fix the problem, please let me know. I really like metafier.py, so it would be a shame if you couldn't run it.

Re: Golly Crashes When Running Python Scripts

PostPosted: July 19th, 2016, 2:17 am
by biggiemac
Having this issue with 2.7.11 (64-bit with 64-bit Golly 2.8b3). Any script causes an immediate exit. I haven't been able to run scripts since getting this new laptop a few months ago, which I attributed to a bittage mismatch. I decided to try a fresh install of both Golly and Python to ensure both were 64-bit and while scripts no longer ask for the .dll (presumably making it past that step), they crash Golly.

Re: Golly Crashes When Running Python Scripts

PostPosted: July 19th, 2016, 2:51 am
by Scorbie
Python 2.7.12 is out. Not sure if that works. Python 2.7.10 seems to work well.

Re: Golly Crashes When Running Python Scripts

PostPosted: July 21st, 2016, 6:32 pm
by Andrew
Scorbie wrote:Python 2.7.12 is out. Not sure if that works.

Python 2.7.12 works fine with Golly 2.8b3 (both 64-bit) on my Win 7 system.

EDIT: biggiemac reported success with 2.7.12 on Win 10.

Re: Golly Crashes When Running Python Scripts

PostPosted: October 3rd, 2016, 3:02 pm
by AbhpzTa
Mine is Golly 2.5

CODE > SELECT ALL > copy
Golly 2.5 > File > Run Clipboard

Golly crashes.
WHY?!

Re: Golly Crashes When Running Python Scripts

PostPosted: October 3rd, 2016, 4:51 pm
by dvgrn
AbhpzTa wrote:Mine is Golly 2.5

CODE > SELECT ALL > copy
Golly 2.5 > File > Run Clipboard

Golly crashes.
WHY?!

Questions 1 through 4:
Golly 2.5 on what OS?
32-bit or 64-bit?
What version of Python do you have installed?
Did you install 32-bit or 64-bit Python?
(Make sure the answers to questions 2 and 4 match...)

Question 5: Is there any reason you can't download Golly 2.8 and try that? You can use your same GollyPrefs and file structure and so on -- just back up and replace the executable and Scripts and Help folders, and Patterns if you want to see the new patterns.

The Golly change log between 2.5 and 2.8 contains a number of items that look like this...

Fixed a nasty bug that could cause Golly to crash...

So the problem may (or may not) have been fixed a long time ago. It's unlikely that anyone will want to troubleshoot a bug that shows up only in Golly 2.5.

Re: Golly Crashes When Running Python Scripts

PostPosted: January 15th, 2019, 11:40 pm
by MilkyWay90
Do you know if this works in Python 3.6?

Re: Golly Crashes When Running Python Scripts

PostPosted: January 16th, 2019, 12:11 am
by 77topaz
This thread was from 2016, and there have been numerous Golly updates since then, so there's a good chance the bugs mentioned in this thread aren't in Golly at all anymore.

Re: Golly Crashes When Running Python Scripts

PostPosted: January 16th, 2019, 12:25 am
by wildmyron
MilkyWay90 wrote:Do you know if this works in Python 3.6?

None of the published versions of Golly support Python 3.6, they all require 2.X (in particular, Golly looks for a 2.7.Y version of the Python dll).

As for as I know, none of the Golly developers are considering adding support for Python 3.6.