Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executable wont run anymore #1467

Open
WanderingMelody opened this issue Nov 21, 2024 · 9 comments
Open

Executable wont run anymore #1467

WanderingMelody opened this issue Nov 21, 2024 · 9 comments

Comments

@WanderingMelody
Copy link

Hey everyone, I've been looking around a bit and this seems to be an issue on an individual level that I cant solve. I have tried several different versions of pronterface, updating then deleting (I think I got it all) and reinstalling latest python version, and even trying to open the executable in an interpreter to see if I could brute force find the issue (it was just a bunch of gibberish to me). Alas, even ignoring the problem and hoping it went away did not work. Pronsole does function correctly, btw. Here is the information I have seen helpful users ask for in other posts... Windows 10 OS Build: 19045.5131
Actions that lead to failure: I run the executable -> Unhandled Exception error window -> Close.
Log: Traceback (most recent call last):
File "pronterface.py", line 62, in
File "printrun\pronterface.py", line 2596, in init
File "printrun\pronterface.py", line 171, in init
File "printrun\pronsole.py", line 778, in parse_cmdline
File "printrun\pronterface.py", line 1161, in process_cmdline_arguments
File "printrun\pronsole.py", line 761, in process_cmdline_arguments
File "printrun\pronsole.py", line 656, in load_default_rc
File "printrun\pronsole.py", line 627, in load_rc
File "cmd.py", line 211, in onecmd
File "printrun\pronsole.py", line 403, in default
File "cmd.py", line 236, in default
AttributeError: 'NoneType' object has no attribute 'write'

I would be absolutely ecstatic if I am doing something stupid that is leading to this issue because I don't believe I have the knowledge to fix anything drastic.

@DivingDuck
Copy link
Collaborator

DivingDuck commented Nov 21, 2024

Hi,
sounds like you have a defect printrun.ini file. Rename or delete the file should help.

Further information: https://github.com/kliment/Printrun/wiki/How-to-%3F#cant-open-pronterface-andor-pronterface-reports-error-message-attributeerror-nonetype-object-has-no-attribute-write-at-start-up-how-to-fix-this

Edit:
Here is a procedure you can follow:
Close Pronterface and try to rename or delete that file and then start it again.
Please check the file printrun.log too. You can add the file here in a zipped version for further investigation if needed.

You should find both files in your root user folder, like c:\Users\YOUR_USER_NAME\ where YOUR_USER_NAME is your windows user name. Please check the other possible location at c:\Users\\YOUR_USER_NAME\AppData\Local\Printrun\Printrun\ in case you can't find them on the first place.

Remark: ...\Appdata... is a hidden folder, you may want to allow showing hidden files and folders in the file explorer.

@WanderingMelody
Copy link
Author

WanderingMelody commented Nov 21, 2024

That did it, #1462, not sure why I didn't find those links in my searching earlier. Thanks a bunch!

@rockstorm101
Copy link
Collaborator

Duplicate of #1462

@rockstorm101 rockstorm101 marked this as a duplicate of #1462 Nov 21, 2024
@rockstorm101
Copy link
Collaborator

@DivingDuck, we get this issue often. I think we should capture this error and just print a warning or something instead of a hard fail. I should have spare time for this in the coming weeks but have a look yourself if you wish too.

@DivingDuck
Copy link
Collaborator

DivingDuck commented Nov 22, 2024

@WanderingMelody,
you are welcome.
Can you do me a favor and attach your log file zipped here (and, if you saved it, the old printrunconf.ini file too)? I want check it if there is something we may had overseen. The log file is called printrun.log and you will find it in your users root folder (same location as the config file).

@DivingDuck
Copy link
Collaborator

@rockstorm101,
Yes we should do so.
I still have a problem with this error because I know it from the past where it happen to me too, but then later I was never able to force this error again to find its real root cause. I again forgot to ask that I need that "damaged" config file so that we are able to do some tests with it...

We may also think about the handling of the config file when running Pronsole in combination with existing custom button's (that just came back in my mind, #1336).

@WanderingMelody
Copy link
Author

@DivingDuck
Many apologies, I was trying to be safe by removing the entire folder rather than preserving the damaged files. I do not have either of the files you asked for.

@DivingDuck
Copy link
Collaborator

@WanderingMelody,
No problem, thanks for coming back and answering my request. ... and happy printing!

@rockstorm101
Copy link
Collaborator

I was never able to force this error again to find its real root cause.

Yeah, same here. Seemed like a Windows-only issue as I wasn't able to reproduce it too.

We may also think about the handling of the config file when running Pronsole in combination with existing custom button's (that just came back in my mind, #1336).

And yes, you are absolutely right. There's definitely room for improvement in how we handle the loading of config files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants