Golly immediately closes when opening a .py file.

Has something gone haywire? Let us know about it!
Post Reply
User avatar
LuxiusGOL
Posts: 116
Joined: April 6th, 2020, 4:28 pm
Location: Giakteda, HKD, Tesana

Golly immediately closes when opening a .py file.

Post by LuxiusGOL » April 19th, 2020, 10:45 pm

Just so you know, I wanted to know what the Python scripts were for, and I installed python27.dll, and whenever I open the file, it crashes with no error message.
iambackhooray

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Golly immediately closes when opening a .py file.

Post by wildmyron » April 20th, 2020, 3:34 am

This generally happens when you have a 32-bit version of Golly and a 64-bit version of the Python dll which Golly is automatically loading. There are a few different ways this can happen and how to fix the problem depends on what the cause is.
LuxiusGOL wrote:
April 19th, 2020, 10:45 pm
Just so you know, I wanted to know what the Python scripts were for, and I installed python27.dll, and whenever I open the file, it crashes with no error message.
How exactly did you install Python? And by "... I installed python27.dll" do you mean that you copied the python27.dll file to your Golly directory? Or to your C:\Windows\System32 directory? If so, then start by deleting this copy and installing Python according the directions for the distribution you downloaded.

The next (or first if the above does not apply) step will generally be to delete any reference to incorrect versions of the Python dll from your Golly settings. First make sure that Golly is not running. Then find your GollyPrefs file - it is usually stored in %APPDATA%\Golly (%APPDATA% is a shortcut to C:\Users\<username>\AppData\Roaming\ on Win10). There may (but unlikely) also be a GollyPrefs file in the Golly application folder. If there is then it will over-ride the version in your AppData folder. Open this file in a text editor, find the line starting with "python_lib=" and if it is not empty then delete the line and save the file.

Now you need to make sure you've got a compatible version of Python 2.7 installed. Check whether your Golly is 32-bit or 64-bit - You can do this easily by running Golly and immediately checking the status bar - it will say something like "This is Golly version 3.3 (64bit). Copyright ..." Then check if you've got a compatible version of Python 2.7 installed. If not then you will need to download a Python installer and install it. Now you should be able to run Python scripts without any further issues.

If you continue to have issues then please provide more information, including: Where did you get Python from, what is the full name of the Python installer, which version of Golly do you have, 32bit or 64bit, and which of the above steps where you able to complete and were there any problems in doing so?
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
LuxiusGOL
Posts: 116
Joined: April 6th, 2020, 4:28 pm
Location: Giakteda, HKD, Tesana

Re: Golly immediately closes when opening a .py file.

Post by LuxiusGOL » April 20th, 2020, 5:35 pm

Golly is 32Bit for me (even though I run it on a 64bit computer). The way I installed it is private information for me.
iambackhooray

User avatar
dvgrn
Moderator
Posts: 10612
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Golly immediately closes when opening a .py file.

Post by dvgrn » April 20th, 2020, 6:11 pm

LuxiusGOL wrote:
April 20th, 2020, 5:35 pm
Golly is 32Bit for me (even though I run it on a 64bit computer). The way I installed it is private information for me.
That's fine, except that nobody will be able to help you get Golly working unless you can confirm that you've installed 32-bit Python 2.7.18 (the link that says "Windows x86 MSI installer", not the "Windows x86-64 MSI installer" -- if you're running Windows, that is.)

Python 2.7.18 is just out today, so hasn't seen a lot of testing -- but it's very likely to work fine as long as you install the 32-bit version.

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

How do I get my python39.dll file to work?

Post by LuxiusGOLFireFox » November 16th, 2020, 6:08 pm

Just so you know, some weird family thing is not allowing me to use Chrome, but I can still use Firefox.
Anyways, I have tried many different methods, like putting in the path, putting it into the golly folder, literally everything I could do will not work.
It still says it cannot load the python library and it says I need to change the version numbers? It says it uses python 3.9, but I copied all the .dll files into there and it still won't work!
Please help with this stupid issue.

goldenratio
Posts: 295
Joined: July 26th, 2020, 10:39 pm
Location: Texas, USA

Re: How do I get my python39.dll file to work?

Post by goldenratio » November 16th, 2020, 6:12 pm

Have you checked that your python is 64 bit? This kind of problem usually stems from that.
Oscillator discussion is boring me out. I'll return when the cgol community switches to something else.

Me on LifeWiki

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

Re: How do I get my python39.dll file to work?

Post by LuxiusGOLFireFox » November 16th, 2020, 6:22 pm

I think I got the x86 version, let me check if it is 64bit or 32bit

edit: yea it is 32 bit

edit 2: I put in the new files and it crashes Golly. What the fuck is going on?

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

Re: Golly immediately closes when opening a .py file.

Post by LuxiusGOLFireFox » November 16th, 2020, 6:38 pm

I got Golly 4.0 now, and got the 64 bit versions of both. It still happens though

User avatar
bubblegum
Posts: 959
Joined: August 25th, 2019, 11:59 pm
Location: click here to do nothing

Re: How do I get my python39.dll file to work?

Post by bubblegum » November 16th, 2020, 6:39 pm

LuxiusGOLFireFox wrote:
November 16th, 2020, 6:22 pm
I think I got the x86 version, let me check if it is 64bit or 32bit

edit: yea it is 32 bit

edit 2: I put in the new files and it crashes Golly. What the fuck is going on?
First of all, don't swear.
Second of all, you can log onto your account from both Chrome and FireFox.

To answer your question, check if Golly is 64-bit or 32-bit. I'm not exactly sure if it's possible to get 64-bit Golly TBH but this kind of mismatch happens surprisingly frequently. There should not be Python DLL files in the Golly folder—just input the path to the file into the input box, like C:\Users\name\Downloads\python39.dll or ~/Python/python39.dll for example. (If you can't get it to show up, go to C:\Users\name\AppData\Local\Golly on Windows or ~/.golly on Linux (I don't know for sure) and delete the line in the GollyPrefs file that specifies the Python version.) x86 should be a 32-bit system and x86-64 a 64-bit system but it really shouldn't matter all that much.
Each day is a hidden opportunity, a frozen waterfall that's waiting to be realised, and one that I'll probably be ignoring
sonata wrote:
July 2nd, 2020, 8:33 pm
conwaylife signatures are amazing[citation needed]
anything

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

Re: How do I get my python39.dll file to work?

Post by LuxiusGOLFireFox » November 16th, 2020, 6:40 pm

bubblegum wrote:
November 16th, 2020, 6:39 pm
LuxiusGOLFireFox wrote:
November 16th, 2020, 6:22 pm
I think I got the x86 version, let me check if it is 64bit or 32bit

edit: yea it is 32 bit

edit 2: I put in the new files and it crashes Golly. What the fuck is going on?
First of all, don't swear.
Second of all, you can log onto your account from both Chrome and FireFox.

To answer your question, check if Golly is 64-bit or 32-bit. I'm not exactly sure if it's possible to get 64-bit Golly TBH but this kind of mismatch happens surprisingly frequently. There should not be Python DLL files in the Golly folder—just input the path to the file into the input box, like C:\Users\name\Downloads\python39.dll or ~/Python/python39.dll for example. (If you can't get it to show up, go to C:\Users\name\AppData\Local\Golly on Windows or ~/.golly on Linux (I don't know for sure) and delete the line in the GollyPrefs file that specifies the Python version.) x86 should be a 32-bit system and x86-64 a 64-bit system but it really shouldn't matter all that much.
The thing is, I tried using the path to Python, and it shows the same error.
And there is no golly folder there.

User avatar
bubblegum
Posts: 959
Joined: August 25th, 2019, 11:59 pm
Location: click here to do nothing

Re: How do I get my python39.dll file to work?

Post by bubblegum » November 16th, 2020, 6:44 pm

LuxiusGOLFireFox wrote:
November 16th, 2020, 6:40 pm
bubblegum wrote:
November 16th, 2020, 6:39 pm
LuxiusGOLFireFox wrote:
November 16th, 2020, 6:22 pm
I think I got the x86 version, let me check if it is 64bit or 32bit

edit: yea it is 32 bit

edit 2: I put in the new files and it crashes Golly. What the fuck is going on?
First of all, don't swear.
Second of all, you can log onto your account from both Chrome and FireFox.

To answer your question, check if Golly is 64-bit or 32-bit. I'm not exactly sure if it's possible to get 64-bit Golly TBH but this kind of mismatch happens surprisingly frequently. There should not be Python DLL files in the Golly folder—just input the path to the file into the input box, like C:\Users\name\Downloads\python39.dll or ~/Python/python39.dll for example. (If you can't get it to show up, go to C:\Users\name\AppData\Local\Golly on Windows or ~/.golly on Linux (I don't know for sure) and delete the line in the GollyPrefs file that specifies the Python version.) x86 should be a 32-bit system and x86-64 a 64-bit system but it really shouldn't matter all that much.
The thing is, I tried using the path to Python, and it shows the same error.
And there is no golly folder there.
I don't know either, I didn't put it in lol. I'll ask Scorbie about this if you can provide a bit more information (what OS are you using, where is Golly located, where is the DLL, what are you putting into the input area, 32- or 64-bit Golly, what version of Golly, 32- or 64- bit Python).

EDIT: I just realised, GollyPrefs is in Roaming, not Local. Oops.
Each day is a hidden opportunity, a frozen waterfall that's waiting to be realised, and one that I'll probably be ignoring
sonata wrote:
July 2nd, 2020, 8:33 pm
conwaylife signatures are amazing[citation needed]
anything

User avatar
dvgrn
Moderator
Posts: 10612
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: How do I get my python39.dll file to work?

Post by dvgrn » November 16th, 2020, 7:06 pm

It sounds like you've been copying Python DLL files to new locations, other than the folders where they're installed. That is very unlikely to do anything besides make the confusion worse.

It would be good to start by uninstalling all copies of Python 3.9 on your system, then install 64-bit Python 3.9 to the default location -- and then tell Golly 4.0 where that location is.

Then, if Golly scripts still don't run, please give very specific information about where the Python DLL is located, which version of everything you downloaded, and the exact text of the error messages you're seeing (if any).

User avatar
dvgrn
Moderator
Posts: 10612
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Golly immediately closes when opening a .py file.

Post by dvgrn » November 16th, 2020, 7:10 pm

LuxiusGOLFireFox wrote:
November 16th, 2020, 6:38 pm
I got Golly 4.0 now, and got the 64 bit versions of both. It still happens though...
There's no point in discussing the same problem in two different places, so I'll move the other thread over here.

Again, vague descriptions of problems don't do much good. Please be as specific as possible, with details about each step you tried and what happened at each step. Filenames, download URLs, screenshots -- all good. "I put in the new files and it crashes Golly" -- not so good, because it doesn't say the name of the "new files", where you got them from, what Python script you opened that crashed Golly, or which version of Golly it was.

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

Re: Golly immediately closes when opening a .py file.

Post by LuxiusGOLFireFox » November 16th, 2020, 7:58 pm

I downloaded the dll from the official python 3.9 64-bit download, and the file path is C:\Users\[REDACTED]\OneDrive\Documents\python-3.9.0-embed-amd64.
I put it in, and it doesn't work, as it shows the same error. If I put it in the Golly filepath, then it crashes. I use Windows 10, Golly is located in Downloads, and I am using 64-bit golly.

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

Re: Golly immediately closes when opening a .py file.

Post by LuxiusGOLFireFox » November 16th, 2020, 8:58 pm

is this thread dead already

User avatar
bubblegum
Posts: 959
Joined: August 25th, 2019, 11:59 pm
Location: click here to do nothing

Re: Golly immediately closes when opening a .py file.

Post by bubblegum » November 16th, 2020, 9:42 pm

LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
is this thread dead already
It's been about 1¾ hours
Each day is a hidden opportunity, a frozen waterfall that's waiting to be realised, and one that I'll probably be ignoring
sonata wrote:
July 2nd, 2020, 8:33 pm
conwaylife signatures are amazing[citation needed]
anything

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Golly immediately closes when opening a .py file.

Post by wildmyron » November 16th, 2020, 9:48 pm

LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
is this thread dead already
This thread is not dead, it's only been inactive for a few hours. Most people have other things to do aside from volunteering their free time to provide free tech support.
LuxiusGOLFireFox wrote:
November 16th, 2020, 7:58 pm
I downloaded the dll from the official python 3.9 64-bit download, and the file path is C:\Users\[REDACTED]\OneDrive\Documents\python-3.9.0-embed-amd64.
I put it in, and it doesn't work, as it shows the same error. If I put it in the Golly filepath, then it crashes. I use Windows 10, Golly is located in Downloads, and I am using 64-bit golly.
You've got the wrong idea there. You can not simply download DLL files and copy them around willy nilly and expect it to work. Go to https://www.python.org/downloads/release/python-390/ download the 64bit installer for Python3.9, and run the installer. The default options will install it to a folder in your User's AppData folder, which by default is a hidden folder. I recommend you tell the installer to add Python to the Windows PATH (tick the box) and then when you next run a Python script in Golly you can enter "python39.dll" and it will work.
If you don't add Python to the PATH then you'll need to enter the full path which will be something like "C:\Users\<username>\AppData\Local\Programs\Python\Python39\python39.dll"
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
dvgrn
Moderator
Posts: 10612
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Golly immediately closes when opening a .py file.

Post by dvgrn » November 16th, 2020, 9:53 pm

LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
is this thread dead already
Instantaneous free tech support is definitely not guaranteed around here. Be prepared to wait a few days before bumping the thread.

Furthermore, you'll get much better tech support on average if you stop giving vague descriptions that could mean a lot of different things, and start taking the time to explain exactly what you're doing, in a way that keeps other people from having to try to read your mind.

Just imagine that you're someone else reading this:
LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
I put it in, and it doesn't work, as it shows the same error.
What did you put into what? Did you, for example, copy and paste the path to the Python DLL into a Golly dialog? Or did you copy and paste the actual DLL file somewhere or other?

What is the "same error"? No error message has been described recently; instead you've said that Golly crashes and exits without an error.
LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
If I put it in the Golly filepath, then it crashes.
The first "it" means the DLL, and the second "it" means Golly? But what does "put" mean? Are you copying the DLL file from the location where the installer puts it, into the "Golly filepath" -- i.e., the root folder where Golly.exe is located? Please don't do that. Always leave the Python DLL where the Python installer puts it. Or do you mean you're putting the path to the file into the place in Golly's error dialog where a filepath is needed?

Also please quote previous instructions that you've been given in previous posts, and state clearly whether you followed those instructions, and what exactly you did when you followed them. E.g., did you uninstall all previously installed versions of Python, and delete any DLLs that you may have copied to random locations? If you need to keep some version of Python installed on this computer, which version, and where is it installed?

After you clean up any DLL junk you may have spread around, try carefully following wildmyron's instructions from the post before this one, and document what happens.

Screenshots are very helpful. Use the "Attachments" tab below the message text area to add screenshots. If you then choose "Place inline", the image will be displayed wherever you've put your cursor in the message.

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

Re: Golly immediately closes when opening a .py file.

Post by LuxiusGOLFireFox » November 17th, 2020, 6:38 pm

dvgrn wrote:
November 16th, 2020, 9:53 pm
LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
is this thread dead already
Instantaneous free tech support is definitely not guaranteed around here. Be prepared to wait a few days before bumping the thread.

Furthermore, you'll get much better tech support on average if you stop giving vague descriptions that could mean a lot of different things, and start taking the time to explain exactly what you're doing, in a way that keeps other people from having to try to read your mind.

Just imagine that you're someone else reading this:
LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
I put it in, and it doesn't work, as it shows the same error.
What did you put into what? Did you, for example, copy and paste the path to the Python DLL into a Golly dialog? Or did you copy and paste the actual DLL file somewhere or other?

What is the "same error"? No error message has been described recently; instead you've said that Golly crashes and exits without an error.
LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
If I put it in the Golly filepath, then it crashes.
The first "it" means the DLL, and the second "it" means Golly? But what does "put" mean? Are you copying the DLL file from the location where the installer puts it, into the "Golly filepath" -- i.e., the root folder where Golly.exe is located? Please don't do that. Always leave the Python DLL where the Python installer puts it. Or do you mean you're putting the path to the file into the place in Golly's error dialog where a filepath is needed?

Also please quote previous instructions that you've been given in previous posts, and state clearly whether you followed those instructions, and what exactly you did when you followed them. E.g., did you uninstall all previously installed versions of Python, and delete any DLLs that you may have copied to random locations? If you need to keep some version of Python installed on this computer, which version, and where is it installed?

After you clean up any DLL junk you may have spread around, try carefully following wildmyron's instructions from the post before this one, and document what happens.

Screenshots are very helpful. Use the "Attachments" tab below the message text area to add screenshots. If you then choose "Place inline", the image will be displayed wherever you've put your cursor in the message.
I put the path into the Golly thing and it crashes after opening a script.
I can't find this attachments thing.
I will go see the post.

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Golly immediately closes when opening a .py file.

Post by wildmyron » November 17th, 2020, 9:28 pm

LuxiusGOLFireFox wrote:
November 17th, 2020, 6:38 pm
dvgrn wrote:
November 16th, 2020, 9:53 pm
Furthermore, you'll get much better tech support on average if you stop giving vague descriptions that could mean a lot of different things, and start taking the time to explain exactly what you're doing, in a way that keeps other people from having to try to read your mind.
I put the path into the Golly thing and it crashes after opening a script.
We can't help you if you don't read what we write, follow the instructions we provide and tell us exactly what you've done.

Did you reinstall Python3 yet? What is the exact path that you put into Golly?

Regarding attachments:
Below the Submit button are two tabs: Options and Attachments. Click the Attachments tab and then click "Add files" to select the file you want to attach.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
LuxiusGOLFireFox
Posts: 15
Joined: November 16th, 2020, 5:57 pm

Re: Golly immediately closes when opening a .py file.

Post by LuxiusGOLFireFox » November 17th, 2020, 9:49 pm

wildmyron wrote:
November 16th, 2020, 9:48 pm
LuxiusGOLFireFox wrote:
November 16th, 2020, 8:58 pm
is this thread dead already
This thread is not dead, it's only been inactive for a few hours. Most people have other things to do aside from volunteering their free time to provide free tech support.
LuxiusGOLFireFox wrote:
November 16th, 2020, 7:58 pm
I downloaded the dll from the official python 3.9 64-bit download, and the file path is C:\Users\[REDACTED]\OneDrive\Documents\python-3.9.0-embed-amd64.
I put it in, and it doesn't work, as it shows the same error. If I put it in the Golly filepath, then it crashes. I use Windows 10, Golly is located in Downloads, and I am using 64-bit golly.
You've got the wrong idea there. You can not simply download DLL files and copy them around willy nilly and expect it to work. Go to https://www.python.org/downloads/release/python-390/ download the 64bit installer for Python3.9, and run the installer. The default options will install it to a folder in your User's AppData folder, which by default is a hidden folder. I recommend you tell the installer to add Python to the Windows PATH (tick the box) and then when you next run a Python script in Golly you can enter "python39.dll" and it will work.
If you don't add Python to the PATH then you'll need to enter the full path which will be something like "C:\Users\<username>\AppData\Local\Programs\Python\Python39\python39.dll"
That doesn't work though. It shows the same message. I will try the PATH thing.
It worked.

Post Reply