Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1225

Python • Re: Script runs fine from Thonny, but not SSH or Geany

$
0
0
Are you running it from the command line in the directory (folder) where the calibration_data.json file is?

If not, you should either change into that directory first, or specify the full path name of the file in your code. Something like

Code:

    with open('/home/myuser/projectdir/calibrate_data.json', 'r') as f:
but change it to match your directory.

Statistics: Posted by rpdom — Sun Feb 02, 2025 9:21 am



Viewing all articles
Browse latest Browse all 1225

Trending Articles