I am using the Logger and LoggerDevice classes in downsample_logging.py to monitor energy consumption with a JS 220. I am running the code in a linux VM.
I have made sure that the USB is connected to the VM and not my host machine and the class is correctly getting the model and serial number of my joulescope. I am running the Logger run function in a separate process (using the multiprocessing module) and have set it to a frequency of 1e4 Hz and a downsample of 1. I am using pyjoulescope-driver = 1.3.12 and the VM is in python 3.8.
I used the same setup on my host machine without issue, and have not adjusted anything but some of the file saving code since porting it over to the VM. The “controller status” light is lit blue. I saw another post on here with the same (or a similar) error code and the issue was identified as a brown out, to check this I detached the joulescope from the VM, kept the same physical setup, and used the UI, this changed the color of the “controller status” light to green and was reading in the information.
I am not sure what could be causing the problem, any advice would be appreciated - thanks!
So, python 3.8 has been end of life for over a year, and we dropped support long before that. We follow the numpy lifecycle, which means that you should be running Python 3.11 or newer as of today, 2025-10-28. The latest version of pyjoulescope_driver is 1.10.0. That 1.3.12 version was from 2023-05-31.
1: Can you update the python version in your VM? You then need to python -m pip install joulescope again.
Note that you may need to use python3 rather than python depending on your linux distribution and setup.
Once that is working, you can easily check that JS220 is available in the VM using:
python -m pyjoulescope_driver info
If you don’t see your Joulescope listed, it’s not configured correctly to be assigned to the VM or with Linux VM OS. Note that you do need the Joulescope udev rules for most Linux distros.
You can verify that on-instrument statistics are working with:
python -m pyjoulescope_driver statistics
2: Are you really running statistics at 1e4 = 10 kHz? It was not designed for that high of rate. We officially only support 100 Hz max, but I know that 1 kHz works reliably. If I remember correctly, 5 kHz was our design limit. If you want 10 kHz update rate, you should be using sample streaming, not statistics.