Failed to initialize PRN device in Python

I try to run a python program and the following message appears on the command line:

"Failed to initialize PRN device"

I should also note that the program is working fine.

+6
source share
3 answers

I had the same problem when I accidentally typed " print program.py" instead of " python program.py". An error message appears from a Windows command prompt called print . Those who suggested restarting the command line probably made the same typo without noticing, and corrected it in their new command line.

+23
source

In my case, rebooting (closing / opening a new one) console or command line window work

0
source

Try changing the name of the program; it worked for me. Do not forget: use the new cmd at startup.

0
source

Source: https://habr.com/ru/post/946773/


All Articles