qspectrumanalyzer icon indicating copy to clipboard operation
qspectrumanalyzer copied to clipboard

OSX AttributeError: module 'subprocess' has no attribute 'PIPE'

Open MountainLogic opened this issue 7 years ago • 1 comments

On my MAC Sierra I've just installed Py 3.6 and -m pip'ed PyQt5 and numpy. Now I'm getting the following error:

MacBook-Pro:qspectrumanalyzer st$ python3.6 qspectrumanalyzer
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "qspectrumanalyzer/__main__.py", line 7, in <module>
    from qspectrumanalyzer import backends
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/qspectrumanalyzer/backends/__init__.py", line 1, in <module>
    import os, glob, subprocess, threading
  File "qspectrumanalyzer/subprocess.py", line 4, in <module>
    PIPE = subprocess.PIPE
AttributeError: module 'subprocess' has no attribute 'PIPE'

I'd appreciate any suggestions to clean up this error. I plan on using this with LimeSDR

MountainLogic avatar Jan 07 '18 03:01 MountainLogic

Same here. I think there is a pitfall with qspectrumanalyser redefining subprocess Python module with the same module name, i.e. qspectrumanalyser/subprocess.py

As a quick workaround, you can change the subprocess.py name as for example subproc.py and update the files that invoke subprocess.X() with subproc.X(). It's a workaround, not a lean and clean solution.

eblot avatar Aug 13 '18 16:08 eblot