Jump to content
  • 0

MCC 134 - example programs Error: "ModuleNotFoundError"


SThibeau

Question

Hi people of Digilent,

We have the Digilent, MCC134 module with a Raspberry Pi-3, and the O/S is newly installed - all fresh.

After installing the daqhats library as per "git clone https://github.com/mccdaq/daqhats.git", the 'single_value_read.py' program was started resulting in an error: "ModuleNotFoundError: no module named 'daqhats'." 

Please see terminal output below:

Browsing through the folders, I noticed that there is no module named 'daqhats.py', only a module named 'daqhats_utils.py' within the 'mcc134' folder.

Any guidance is greatly appreciated.

Regards,

Sean

 

pi@raspberrypi:~/daqhats $ daqhats_version

daqhats version 1.4.0.7 is installed
pi@raspberrypi:~/daqhats $ ls
daqhats  docsource  include     lib      README.md  tools         version_history.txt
docs     examples   install.sh  LICENSE  setup.py   uninstall.sh
pi@raspberrypi:~/daqhats $ cd examples
pi@raspberrypi:~/daqhats/examples $ ls
c  python
pi@raspberrypi:~/daqhats/examples $ cd python
pi@raspberrypi:~/daqhats/examples/python $ ls
mcc118  mcc128  mcc134  mcc152  mcc172
pi@raspberrypi:~/daqhats/examples/python $ cd mcc134
pi@raspberrypi:~/daqhats/examples/python/mcc134 $ ls
daqhats_utils.py  ifttt  README.md  single_value_read.py  web_server
pi@raspberrypi:~/daqhats/examples/python/mcc134 $ python3 single_value_read.py
Traceback (most recent call last):
  File "/home/pi/daqhats/examples/python/mcc134/single_value_read.py", line 18, in <module>
    from daqhats import mcc134, HatIDs, HatError, TcTypes
ModuleNotFoundError: No module named 'daqhats'
pi@raspberrypi:~/daqhats/examples/python/mcc134 $ 

 

 

 

 

 

 

 

Edited by SThibeau
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @SThibeau.

Which Raspberry Pi module and OS are you using?  The MCC DAQ HATS are supported in a Raspbian OS.  

Do you have any other daq hats installed besides the (one?) MCC 134?  If you only have one MCC DAQ HAT, verify that there are no jumpers on the board's address header.

In your RPi configuration, under Preferences-->Raspberry Pi Configuration-->Interfaces, please verify that both SPI and I2C are enabled.

Next, open the Raspbian desktop's Terminal.  Run the command daqhats_list_boards followed by sudo daqhats_read_eeproms.  You can also run the MCC DAQ HAT Manager utility, under the Accessories menu option.  Please reply with screen captures of your results.

Lastly, what is the serial number shown on the board's backside label?

Resources:

https://mccdaq.github.io/daqhats/overview.html#mcc-134

https://mccdaq.github.io/daqhats/install.html

https://files.digilent.com/datasheets/DS-MCC-134.pdf

Regards,

Fausto

Link to comment
Share on other sites

  • 0

Hello Fausto,

Thank you for your reply and the resources links.

Please find several photos and screen captures attached:

RPi: 3 Model B V1.2 / 2015

O/S: latest, 2023-10-10-raspios-bookworm-armhf-full 

- Raspberry Pi OS with desktop and recommended software

- Release date: October 10th 2023

- System: 32-bit / Kernel version: 6.1 / Debian version: 12 (bookworm)

Yes, we only have the one MCC134 hat.  No jumpers on board (see photo).

Yes, all RPi configuration settings are selected ON (see screen capture).

See MCC DAQ HAT Manager Utility, daqhats_list_boards, sudo daqhats_read_eeproms (see screen capture).

MCC-134 board numbers: please see photos attached.

 

The daqhats library was uninstalled; cd ~/daqhats,sudo ./uninstall.sh, and then reinstalled as per instructions; cd ~/daqhats sudo ./install.sh

During installation, the terminal states: "Installing library for Python 3; error: externally-managed-environment", following by several 'virtual environment' statements (see screen captures).

I suspect that the installation may be only partial due to "externally managed" environment issue? Perhaps this is why the daqhats module is missing from installation.

(see screen capture).  

Regards,

Sean

 

 

20231019_104007.jpg

20231019_103900.jpg

20231019_103804.jpg

2023-10-19-100902_1680x1050_scrot.png

2023-10-19-102847_1680x1050_scrot.thumb.png.bd56c95e930228da2f6fc34843fc3e61.png

2023-10-19-102857_1680x1050_scrot.png

2023-10-19-102941_1680x1050_scrot.png

Edited by SThibeau
Link to comment
Share on other sites

  • 0

Hello Fausto,

Thank you for your excellent assistance, everything now functions well.

In order to run the web_server.py program, dash installation required a virtual python environment to be created, which also seems to be functional now.

Looking forward to exploring the MCC_134 now with the 'ifttt' system provided by Digilent.

Regards,

Sean

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...