kliment / Printrun

Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software
GNU General Public License v3.0
2.38k stars 997 forks source link

Pronterface caused a bluescreen and now unable to open after reinstall #1458

Closed Sleff1 closed 1 month ago

Sleff1 commented 1 month ago

When i opened pronterface and connected my printer via usb cable I got a bluescreen and now i can't open the program. Reinstalling didn't help.

Version: 2.1.0 x64 Printer: Ender 3v2 Creality 4.2.2 System: Windows 11

Error i get:

Traceback (most recent call last):
  File "pronterface.py", line 62, in <module>
  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'
DivingDuck commented 1 month ago

What version of Pronterface is installed?

Sleff1 commented 1 month ago

2.1.0 x64

DivingDuck commented 1 month ago

This is unusual. Can you try to reboot your system?

Edit: If this do not help please delete the file c:\Users\YourUserName\printrunconf.ini and c:\Users\YourUserName\printrun.log. Then try to start Pronterface again.

Attach the file c:\Users\YourUserName\printrun.log when you still then have the problem. This should maybe help to get a bit more information.

Sleff1 commented 1 month ago

I rebooted the system and the same error shows up and I also don't have printrunconf.ini and I only have this log: printrun.log

Edit: I should add that my printer has some issues with communication with my laptop(It doesn't even detect it when the psu is on and only when its off) and on this pc its a miracle when it finally connects.

another edit: If you find some "controversial" m117 commands I'm really sorry for that(I'm quite immature despite my age )

DivingDuck commented 1 month ago

Looking to the log I see you have set a very high baud rate for connecting to your printer. Depending on the environment, length and quality of your usb cable you may need to check what rate is needed for a save communication. Try to use a lower one, start with: 115200 baud.

Sleff1 commented 1 month ago

I set the baud rate that high because I had a klipper flashed on the printer that was set that high. I was just checking if I would get any response because my laptop only connects to the mcu when the printer power supply is turned off and I don't know why(pc connects only sometimes looks like it's random).

DivingDuck commented 1 month ago

This is why I mentioned a much lower baud rate, because I see in your log file that Pronterface isn't able to establish a robust connection with your setup. Please start with 115200 baud.

Edit: Regarding Klipper, you need to take care that your com port is only used by Pronterface and not parallel from Klipper too.

Sleff1 commented 1 month ago

I would but I cannot open pronterface due to that error even after reinstalling and deleting the log

DivingDuck commented 1 month ago

Search for the file printrunconf.ini on your computer. On windows 10 there are two possible locations: one is the already mentioned location c:\Users\YourUserName\printrun.log and the other is c:\Users\YourUserName\AppData\Local\Printrun\, where you need to change YourUserName with your real Windows Username.

Keep in mind that the folder AppData is a hidden directory.

Sleff1 commented 1 month ago

I deleted that file and now it works. Thank you so much for your help.

DivingDuck commented 1 month ago

Perfect. Good to hear. Now you need to check what baud rate would work best for your usb cable and printer.

BTW, where was the file located?

DivingDuck commented 1 month ago

@Sleff1, I will close the issue as your Pronterface installation is now working. Best regards, DD