I am attempting to write a program that can pair to a game console via bluetooth and act as a controller for it. In order to do this, I have tried to install PyBlueZ, but I can get no further than import bluetooth, because it displays this error on my screen:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import bluetooth
File "C:\Python35\lib\bluetooth\__init__.py", line 39, in <module>
from bluetooth.msbt import *
File "C:\Python35\lib\bluetooth\msbt.py", line 2, in <module>
import bluetooth._msbt as bt
ImportError: No module named 'bluetooth._msbt'
Is this because of an error in my installation, or is the module just broken? In either case, is there a fix?
Related
I have been trying to code the display on my Ableton push 2 with python using this guide: github.com/ffont/push2-python#using-the-simulator, but I ran into a problem with pyusb and i was missing libusb. pip3 kept saying I already had it installed but I still kept getting errors when trying to use Libusb. So i tried using homebrew and it installed it but I still keep getting errors when using libusb.
this is what my terminal looks like when trying to import:
>>> import libusb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/__init__.py", line 7, in <module>
from ._libusb import * ; del _libusb # noqa
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/_libusb.py", line 29, in <module>
from ._platform import CFUNC
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/_platform/__init__.py", line 33, in <module>
from ._osx import DLL_PATH, DLL, dlclose, CFUNC
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/libusb/_platform/_osx/__init__.py", line 14, in <module>
raise NotImplementedError("This OS is not supported yet!")
NotImplementedError: This OS is not supported yet!
I am using Spyder 4 and Python 3.6 on Ubuntu 18.04.4. I just wrote import wx in the console to import the wxpython and got the ImportError. Here is the error message,
Traceback (most recent call last):
File "<ipython-input-1-03faa7660341>", line 1, in <module>
import wx
File "/home/divyang/Softwares/Linux/yes/lib/python3.6/site-packages/wx/__init__.py", line 17, in <module>
from wx.core import *
File "/home/divyang/Softwares/Linux/yes/lib/python3.6/site-packages/wx/core.py", line 12, in <module>
from ._core import *
ImportError: /home/divyang/Softwares/Linux/yes/lib/python3.6/site-packages/wx/../../../././libharfbuzz.so.0: undefined symbol: FT_Done_MM_Var
I tried to google this thing but got no working result. Please help me to solve this.
I'm trying the solution for this issue here: Access and handle chrome extension popup using selenium webdriver
I'm getting an error when trying to import pyrobot and could not find any solution as to why I'm seeing this import error.
Traceback (most recent call last):
File "jungle.py", line 11, in <module>
from pyrobot import Robot
ImportError: cannot import name Robot
Chads-MacBook-Pro:amazon chad$ python jungle.py
Traceback (most recent call last):
File "jungle.py", line 11, in <module>
from pyrobot import Robot
File "/Users/chad/anaconda2/lib/python2.7/site-packages/pyrobot/__init__.py", line 3, in <module>
from .browser import RoboBrowser
File "/Users/chad/anaconda2/lib/python2.7/site-packages/pyrobot/browser.py", line 12, in <module>
from .forms.form import Form
ImportError: No module named forms.form
so I used pip v19.1.1 to install SciPy on my Raspberry Pi 3(B) running Raspbian Strech.
The installation was successful and when I tried to import scipy, I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/me/.local/lib/python3.5/site-packages/scipy/__init__.py", line 119, in <module>
from scipy._lib._ccallback import LowLevelCallable
File "/home/me/.local/lib/python3.5/site-packages/scipy/_lib/_ccallback.py", line 1, in <module>
from . import _ccallback_c
ImportError: cannot import name '_ccallback_c'
I haven't been able to find any solutions else where, including stack exchange where there is a quetsion with the same issue, but since I'm using a raspberry pi, maybe the cause would be different? I've tried all the answers over there too but none of them worked :( Any help would be greatly appreciated!
I want to use the module autobahn-autoreconnect and it works fine locally with PyCharm. I just install the module with PyCharm and exchange the old ApplicationRunner line with the new one:
# from autobahn.asyncio.wamp import ApplicationRunner
from autobahn_autoreconnect import ApplicationRunner
But when I install it on an Ubuntu server with pip3 install autobahn-autoreconnect and then use just import autobahn_autoreconnect I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/autobahn_autoreconnect/__init__.py", line 31, in <module>
from autobahn.wamp import protocol
File "/usr/local/lib/python3.5/dist-packages/autobahn/wamp/protocol.py", line 272, in <module>
class ApplicationSession(BaseSession):
File "/usr/local/lib/python3.5/dist-packages/autobahn/wamp/protocol.py", line 277, in ApplicationSession
log = txaio.make_logger()
File "/usr/local/lib/python3.5/dist-packages/txaio/_unframework.py", line 43, in _throw_usage_error
"To use txaio, you must first select a framework "
RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_asyncio()
What am I doing wrong?
The following solution worked for me.
First:
import txaio
txaio.use_asyncio()
Second:
from autobahn_autoreconnect import ApplicationRunner