PyBluez examples yells OsError on Windows - python

I've just installed PyBluez on my windows 8 laptop, and I've tried to launch the module examples to test if it works properly.
When I run the examples/simple/inquiry.py file I get the following error:
C:\Users\Manuel\AppData\Local\Programs\Python\Python35-32\Lib\site-packages>python C:\Users\Manuel\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\PyBluez-0.22\examples\simple\inquiry.py
performing inquiry...
Traceback (most recent call last):
File "C:\Users\Manuel\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\PyBluez-0.22\examples\simple\inquiry.py", line 13, in <module>
duration=8, lookup_names=True, flush_cache=True, lookup_class=False)
File " C:\Users\Manuel\AppData\Local\Programs\Python\Python35-32\Lib\site-packages\bluetooth\msbt.py", line 15, in discover_devices
devices = bt.discover_devices(duration=duration, flush_cache=flush_cache)
OS Error
My bluetooth is turned on, and I have no idea of what's going on.
Any help?

Related

Can't find monitor in python using screeninfo

When I call the function get_monitors()
from screeninfo import get_monitors
monitors = get_monitors()
I keep getting this error:
Traceback (most recent call last):
File "C:/Users/User/manim/test1/functionTest.py", line 3, in <module>
monitors = get_monitors()
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\screeninfo\screeninfo.py", line 37, in get_monitors
raise ScreenInfoError("No enumerators available")
screeninfo.common.ScreenInfoError: No enumerators available
I've tried deleting ScreenInfo and reinstalling it, and installing some other
packages such as pynput to no success.
Maybe me using the kivy library did something?

How to reinstall or fix Python interpreter for XCode lldb?

I got this message at XCode after deleting some system files.
(lldb) script
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'run_python_interpreter' is not defined
P.S. Had to reinstall XCode, but I've got same message at debugger after reinstalling IDE
Terminal output
$ lldb
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 52, in <module>
import weakref
File "/usr/local/Cellar/python#2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
You have a local installation of python on your computer (in /usr/local/Cellar). There's a problem when you have two different pythons on your system; lldb links against /System/Library/Frameworks/Python.framework but that python somehow ends up using the python libraries from your installed copy instead. I saw someone work around this once but I forget if it was by putting their local python last in $PATH or if they un-set their $PYTHONPATH before starting lldb.

pydc1394 not recognizing Point Grey Flea3 Camera

I am running Python 2.7 on Mac OS X. I have downloaded and installed pydc1394 so as to have it as a python library. I'm trying to run the save_image.py program. The camera is connected via USB to my Mac. When I try to run the code, however, I get an error saying
Opening camera!
Traceback (most recent call last):
File "<string>", line 100, in <module>
File "build/bdist.macosx-10.6-intel/egg/pydc1394/camera2.py", line 1009, in __init__
IndexError: list index out of range
[Finished in 0.1s]
The code for pydc1394 can be found in https://github.com/jordens/pydc1394.
My guess is that it doesn't sense the camera, however I am sure that it is 1394 compatible, and that it is connected to the laptop.
Thank you!

Problems with cx_Freeze - ImportError

I'm trying to freeze application written in python (PySide), Qt. I'm using LMDE, and in Windows application runs, but have problems with Linux.
When I try it at another computer with same version of Mint Debian it doesn't start, and when I try to start it in terminal, it pops:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/cx_Freeze/initscripts/Console.py", line 27, in <module>
File "start.py", line 3, in <module>
File "/home/alexdeb/Desktop/AlexW/EXE_Start.py", line 9, in <module>
File "ExtensionLoader_PySide_QtCore.py", line 11, in <module>
ImportError: libpyside-python2.7.so.1.1: cannot open shared object file: No such file or directory
Any help, please?
Run the application using strace to find out which object file it's trying to load

py2exe ImportError

I read the py2exe tutorial and successfully convert my python code to a running exectuable.
But when i tried to run it on another computer that dont have python installed , i get the following error:
Traceback (most recent call last):
File "C:\Program_Files\Pyton2_7_2\lib\site-packages\py2exe\boot_common.py", line 92, in
ImportError: No module named linecache
Traceback (most recent call last):
File "auto_create_workspace.py", line 1, in
ImportError: No module named subprocess
On my computer , even if I uninstalled python , it still works.
UPDATE
I tried to copy the dist folder to another drive on my computer and it still working.
When I copy it to network drive and run from there , I get the same error as above.
What can be the problem?
I still dont know what is the problem in py2exe, so I tried pyinstaller instead and its works

Categories

Resources