Hello! I am new to Python and Bokeh but I have done this before… I am setting up a series of weather reporting stations on Raspberry pi zeros. I have two of them set up and working. I have been using bokeh to display the plots. on two of them. The third one is driving me nuts.
Python seems happy, at least so far as the part that records the sensor data works, and I can bring python up from the command line:
windmill:~ $ python
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
And I can import bokeh and get the version info:
So that looks good.
The problem is the script to create the plots that works on the other two stations gives a long line of noise and exits with a ValueError: source code string cannot contain null bytes error.
windmill:~ $ /usr/bin/python3 ./weather_graph.py
Traceback (most recent call last):
File “./weather_graph.py”, line 11, in
from bokeh.plotting import figure, show, output_file, save
File “/home/joe/.local/lib/python3.7/site-packages/bokeh/plotting/init.py”, line 20, in
from . import figure as _figure ; _figure
File “/home/joe/.local/lib/python3.7/site-packages/bokeh/plotting/figure.py”, line 20, in
from …core.properties import (
File “/home/joe/.local/lib/python3.7/site-packages/bokeh/core/properties.py”, line 286, in
from .property.dataspec import AlphaSpec; AlphaSpec
File “/home/joe/.local/lib/python3.7/site-packages/bokeh/core/property/dataspec.py”, line 27, in
from .datetime import Datetime, TimeDelta
File “/home/joe/.local/lib/python3.7/site-packages/bokeh/core/property/datetime.py”, line 25, in
ValueError: source code string cannot contain null bytes
I have been trying to figure this out on my own. I have tried bringing the script over again from one of the machines that works, in case it somehow got corrupted. Same error.
I thought my data may have something weird with it so I both looked at it and it looks fine and I tried pointing this script at one of the other stations raw data. Same error.
I think the problem is with bokeh, because on the other systems if I run bokeh info from the command line I get a nice summery of the system. If I run the same command on the bad system, I get the same big blast of noise and the same error.
I have tried uninstalling bokeh and re-installing it. Same error.
Any help would be appreciated. I am running out of ideas on this one! Thank you!