Our computer running artiq froze, and we terminated the artiq_master and artiq_dashboard terminals. After the computer came back, we ran artiq_master to start artiq back up, but were give the error:
"ValueError: source code string cannot contain null bytes"

Here's a full traceback (screenshot)

I'm guessing artiq is looking for one of the temporary files it sets up in the main directory. During the computer freezing there must have been an error in writing to it, and now it can't read the file. Is this a correct diagnosis? Either way, how do we resolve this issue? We already restarted the computer 😉

We're not worried about recovering the last state of the artiq databases and dashboard experiments. We just want artiq_master to work again.

We're not worried about recovering the last state of the artiq databases and dashboard experiments.

Then just delete the *.pyon files in the current directory. That should fix the issue (but delete your data).

Thank you! Deleting the .pyon files worked 🙂

3 months later

Hi @sb10q we have a similar problem again. This time artiq_master starts up just fine, but when running artiq_dashboard, the dashboard will pop up for half a second before closing with this error

I've deleted "dataset_db.pyon" and "last_rid.pyon" and rerun artiq_dashboard but this didn't solve this issue. I can't find any other pyon files.

Thanks for your help!

The other pyon files (for the dashboard) are located in the user settings directory (something like C:\Users\YourUserName\AppData\artiq\...).

Thank you! Worked like a charm. The file was in C:Users\myusername\AppData\Local\m-labs\artiq\6\artiq_dashboard_*.pyon