Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import error with raspberry pi #5

Closed
alihanks opened this issue Aug 5, 2022 · 6 comments
Closed

import error with raspberry pi #5

alihanks opened this issue Aug 5, 2022 · 6 comments

Comments

@alihanks
Copy link

alihanks commented Aug 5, 2022

I am trying to use this software to interface with the sparkfun triple axis accelerometer breakout. I am using a python 3b+ with the bullseye Raspian OS and python 3.9. The error I'm getting is:

import qwiic_kx13x Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.9/dist-packages/qwiic_kx13x.py", line 334 """ ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa0 in position 173: invalid start byte
I have also gotten the same error using an older Raspian OS and python 3.5.

@hernandezurbina
Copy link

is this solved? I'm getting the same error on a Raspberry Pi 4 using a servo phat to connect the qwiic accelerometer. I'm using python 3.7.

@greg-jc
Copy link

greg-jc commented Mar 16, 2023

Has this been solved yet? I am using the Triple Axis Accelerometer Breakout - KX132 on a Raspberry Pi 4B connected with the Sparkfun Raspberry Pi Qwiic SHIM. Raspberry Pi OS and Python version 3.9.2. It gives me the same error.

@Aser-Abdelfatah
Copy link

I'm getting same error with Nvidia Jetbot

@sfe-SparkFro
Copy link
Contributor

Hi folks, sorry for the delay on this fix! I had the same problem. Looks like there was a weird character in the comment block that caused this, so I just removed that and it imports fine on my end now.

@Aser-Abdelfatah
Copy link

Now, I get a different error: Invalid driver class name. Unable to locate QwiicKx13X

@sfe-SparkFro
Copy link
Contributor

sfe-SparkFro commented Jul 9, 2024

Good catch! I also get this when calling import qwiic, as indicated by your issue in Qwiic_Py. import qwiic_kx13x seems to work fine, so you can use that as a workaround until that gets fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants