SlushEngine smBus I2C issue


#1

It seems that the most recent version of the smBus2 is causing some issues in the installation. Everything installs fine but then this error is thrown on import. I am using Python V3.6

> >>> import Slush
> Traceback (most recent call last):
>   File "/usr/local/lib/python3.5/dist-packages/Slush-0.1d-py3.5.egg/Slush/Base.py", line 33, in <module>
>     import smbus2 as SMBus
> ImportError: No module named 'smbus2'

#2

Thanks for the heads up. We saw this issue on a recent install. We should have the issue sorted out this week. We will post more info on the fix when it is done.


#3

I had the same error with my first motor try on the Model: D I received Friday. I am using the standard Pi desktop on a Pi 3b+ and Python 3.5.3.

“pip install smbus2” suggested in another forum made that error go away. Now I get ('Slush" has no attribute ‘Boards’) as the error. I double checked that both interfaces are enabled and the board has good power.

Regarding enabling the interface for future Pi noobs it may have changed locations. For me it was under “Interfacing Options” and not “Advance Options” as the instructions indicated.

Dave


#4

Can you give me an update on this fix or should I try an older Python version. I think I ran into this same issue.

Dave


#5

We have tested the latest install script against the latest Raspberry Pi image. The installation is now working correctly.

One thing to be cautious about is not to run Python and import Slush from inside the SlushEngine install directory. Also be sure to enabled SPI and I2C from the ‘raspi-config’ interface.


#6

Since I have the Model D used in the RBX1 - Remix robotic arm I found and gave the automatic setup script described in its .pdf instructions a try. I don’t feel like I missed a step in the Model D instructions, but it is working now after following the instructions below.
-------------------------------------------------------------------------------
Install Slush
Installing Slush is done automatically with the following command. If you have a slow network setup this may
take a while as there are several packages that get loaded and installed.
$ sudo wget https://raw.githubusercontent.com/Roboteurs/slushengine/master/install.pl -O - | perl
--------------------------------------------------------------------------------

Dave


#7

@Milly
I had the same problem, but eventually found out that smbus2 default gets installed under /usr/local/lib/python2.7/dist-packages. Moving it over to python3.5 (in my case) solved it.


#8

Purchased a Pi 3 and Slushengine Model X LT back in March of 2017. All was good, the system was driving a Nema 23 stepper motor. Took the system apart by simply unplugging the motor and power supply from the Slushengine board and Pi 3 to move it to a new area in the building. 6 Months passed before the system was reassembled. After reassembly (simply plugging in 2 cables) the system was powered up and I received the error below when I tried to run a previously working program. I attempted the fixes mentioned in this thread and still had the error below. Under the suggestion of a fellow engineer. I reloaded with the latest version of Raspbian and Python 3 and reloaded all associated Slush software per the instructions. Unfortunately I am still getting the same error below. Looking for suggestions to solve the problem. Thanks.
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type “copyright”, “credits” or “license()” for more information.

import Slush
Traceback (most recent call last):
File “/usr/local/lib/python3.5/dist-packages/Slush-0.1d-py3.5.egg/Slush/Base.py”, line 33, in
import smbus2 as SMBus
ImportError: No module named ‘smbus2’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “<pyshell#0>”, line 1, in
import Slush
File “/usr/local/lib/python3.5/dist-packages/Slush-0.1d-py3.5.egg/Slush/init.py”, line 5, in
from Slush.Board import *
File “/usr/local/lib/python3.5/dist-packages/Slush-0.1d-py3.5.egg/Slush/Board.py”, line 4, in
from Slush.Base import *
File “/usr/local/lib/python3.5/dist-packages/Slush-0.1d-py3.5.egg/Slush/Base.py”, line 35, in
raise ImportError(“Cannot Load SMBus library”)
ImportError: Cannot Load SMBus library


#9

Hi charlieb,

Have a look at this post Issues with import Slush, hopefully it should resolve your issue.