1

I am trying to debug a python script that depends on a package which has been compiled. It has a __init__.pyd files which when loaded into the debugger I get:

Traceback (most recent call last):
    File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\pydevd.py", line 1596, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
    File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.3.2\helpers\pydev\pydevd.py", line 974, in run
pydev_imports.execfile(file, globals, locals) # execute the script
    File "C:\Program Files\Python27-13\lib\site-packages\package_name\module\__init__.pyd", line 1
SyntaxError: Non-ASCII character '\x90' in file C:\Program Files\Python27-13\lib\site-packages\package_name\module\__init__.pyd on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

The file is a binary .pyd file so the error makes sense. How can I tell PyCharm and Pydev to not try and step through the file? I am using python 2.7 with PyCharm 2016.3.2. Any tips?

Thanks,

Nathan

nat45928
  • 259
  • 1
  • 6
  • 20

1 Answers1

0

Your init file shouldn't be a .pyd file.
What is __init__.py for?

That's used to initialize modules, it's not a windows .dll
https://docs.python.org/3/faq/windows.html#is-a-pyd-file-the-same-as-a-dll

Community
  • 1
  • 1
Doyousketch2
  • 2,060
  • 1
  • 11
  • 11