Pycharm debugger doesn't work properly with system commands

92 views Asked by At

I'm trying to debug a program with the following command

os.system('ocrmypdf -l por --force-ocr --pages 1 \"' + dirname + '/' + pdf_name + '\" \"' + ocr_dir + str(index) + '.pdf\"')

When I run the code it works, but in the debugger it displays the error:

ModuleNotFoundError: No module named 'ocrmypdf.__main__'; 'ocrmypdf' is not a package

And the command doesn't work. As the program runs normally when not on the debug mode I think it is some Pycharm configuration, but I don't know how to solve it.

0

There are 0 answers