ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Golly Crashes When Running Python Scripts

Has something gone haywire? Let us know about it!

Golly Crashes When Running Python Scripts

Postby gnosis1123 » June 1st, 2016, 1:05 pm

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.
gnosis1123
 
Posts: 3
Joined: June 1st, 2016, 12:59 pm

Re: Golly Crashes When Running Python Scripts

Postby dvgrn » June 1st, 2016, 1:39 pm

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...!
User avatar
dvgrn
Moderator
 
Posts: 5827
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly Crashes When Running Python Scripts

Postby Sphenocorona » June 2nd, 2016, 2:38 am

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.
Sphenocorona
 
Posts: 480
Joined: April 9th, 2013, 11:03 pm

Re: Golly Crashes When Running Python Scripts

Postby gnosis1123 » June 3rd, 2016, 11:59 am

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.
gnosis1123
 
Posts: 3
Joined: June 1st, 2016, 12:59 pm

Re: Golly Crashes When Running Python Scripts

Postby dvgrn » June 3rd, 2016, 12:21 pm

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.
User avatar
dvgrn
Moderator
 
Posts: 5827
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly Crashes When Running Python Scripts

Postby gnosis1123 » June 3rd, 2016, 1:47 pm

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.
gnosis1123
 
Posts: 3
Joined: June 1st, 2016, 12:59 pm

Re: Golly Crashes When Running Python Scripts

Postby dvgrn » June 3rd, 2016, 3:27 pm

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.
User avatar
dvgrn
Moderator
 
Posts: 5827
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly Crashes When Running Python Scripts

Postby biggiemac » July 19th, 2016, 2:17 am

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.
Physics: sophistication from simplicity.
User avatar
biggiemac
 
Posts: 504
Joined: September 17th, 2014, 12:21 am
Location: California, USA

Re: Golly Crashes When Running Python Scripts

Postby Scorbie » July 19th, 2016, 2:51 am

Python 2.7.12 is out. Not sure if that works. Python 2.7.10 seems to work well.
Best wishes to you, Scorbie
User avatar
Scorbie
 
Posts: 1381
Joined: December 7th, 2013, 1:05 am

Re: Golly Crashes When Running Python Scripts

Postby Andrew » July 21st, 2016, 6:32 pm

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.
User avatar
Andrew
Moderator
 
Posts: 752
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Golly Crashes When Running Python Scripts

Postby AbhpzTa » October 3rd, 2016, 3:02 pm

Mine is Golly 2.5

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

Golly crashes.
WHY?!
Iteration of sigma(n)+tau(n)-n [sigma(n)+tau(n)-n : OEIS A163163] (e.g. 16,20,28,34,24,44,46,30,50,49,11,3,3, ...) :
965808 is period 336 (max = 207085118608).
AbhpzTa
 
Posts: 473
Joined: April 13th, 2016, 9:40 am
Location: Ishikawa Prefecture, Japan

Re: Golly Crashes When Running Python Scripts

Postby dvgrn » October 3rd, 2016, 4:51 pm

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.
User avatar
dvgrn
Moderator
 
Posts: 5827
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Golly Crashes When Running Python Scripts

Postby MilkyWay90 » January 15th, 2019, 11:40 pm

Do you know if this works in Python 3.6?
MilkyWay90
 
Posts: 3
Joined: December 2nd, 2018, 6:06 pm

Re: Golly Crashes When Running Python Scripts

Postby 77topaz » January 16th, 2019, 12:11 am

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.
User avatar
77topaz
 
Posts: 1345
Joined: January 12th, 2018, 9:19 pm

Re: Golly Crashes When Running Python Scripts

Postby wildmyron » January 16th, 2019, 12:25 am

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.
The latest version of the 5S Project contains over 221,000 spaceships. Tabulated pages up to period 160 are available on the LifeWiki.
wildmyron
 
Posts: 1237
Joined: August 9th, 2013, 12:45 am


Return to Bugs & Errors

Who is online

Users browsing this forum: No registered users and 0 guests