Comments (12)
Hi @Georg2K2, thank you for using my library!
I have only been able to reproduce this issue by incorrectly importing the module.
>>> import mpu6050
>>> sensor = mpu6050(0x68)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable
You can either import the module using from mpu6050 import mpu6050
and call the class constructor with mpu6050(0x68)
or import the module using import mpu6050
and call the constructor with mpu6050.mpu6050(0x68)
.
I hope this fixes your issue.
from mpu6050.
Like stated above, I import the module like:
from mpu6050 import mpu6050
and use it like described by you, but it still doesnt work for me :c
from mpu6050.
Hm. That is really weird. Does the example script (in the repository bin/mpu6050-example
) work for you?
from mpu6050.
I get the error: No module named 'mpu6050'
I tried running the setup.py again, sadly it doesn't work. (also you might edit the instructions from "python setup.py install" to "sudo python setup.py install")
I tried doing the pip install, restarted and now I get "TypeError: 'module' object is not callable" on the example script
from mpu6050.
Which version of python are you using? If your system has both python 2.7.x and python 3, are you consistently using the same python version while testing?
from mpu6050.
im using python python 3
from mpu6050.
but I got it working now on Python 2.7.13!
from mpu6050.
Nice that it works now, could you maybe explain what you did differently with python 2.7? In the case that someone else might ever stumble on the same issue as you.
from mpu6050.
I just launched the script with python 2 instead of 3... ¯_(ツ)_/¯
from mpu6050.
I just launched the script with python 2 instead of 3... ¯_(ツ)_/¯
can you please tell the command you used to launch python 2 in raspberry pi??? I'm having the same error.....
from mpu6050.
I just launched the script with python 2 instead of 3... ¯_(ツ)_/¯
if you're using python 2, doesn't it create problem in other operations???
from mpu6050.
I didn't run into any other problems... I haven't used that pi in years, I would have to google it again as well, sorry :/ maybe something like 'python2.7' in cmd, I'm not a huge Ubuntu buff...
from mpu6050.
Related Issues (20)
- want to increase getdegree_X() function HOT 1
- Python3 support HOT 11
- Getting Tracebacks on calling get_accel_data() HOT 4
- no checking connectivity HOT 2
- Gyro and accelerometer range HOT 3
- AttributeError: 'int' object has no attribute 'read_i2c_word' HOT 1
- FileNotFoundError: [Errno 2] No such file or directory HOT 1
- OSError: [Errno 121] Remote I/O error HOT 10
- Raspberry Pi - No Accelerometer Data Detected HOT 2
- ModuleNotFoundError when importing mpu6050 HOT 6
- Only zeros HOT 1
- Documentation overhaul HOT 1
- TypeError: 'module' object is not callable HOT 1
- OS Error : [Errorno 121] Remote I/O error HOT 6
- MODULE ERROR HOT 1
- Wrong question sorry delete
- Ask HOT 6
- accelometer data
- OSError: 121 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpu6050.