Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location of ini and py files on Rasberry Pi #9

Open
NAP1947 opened this issue Aug 30, 2020 · 3 comments
Open

Location of ini and py files on Rasberry Pi #9

NAP1947 opened this issue Aug 30, 2020 · 3 comments

Comments

@NAP1947
Copy link

NAP1947 commented Aug 30, 2020

I am not conversant with Python 3 ins and outs and have followed the submissions related to the error attributed to using Python 2 instead of Python 3.

I am using Python 3.7.3 (default, Jul 25 2020, 13:03:44) on a raspberry Pi 3.

My files are located as follows," pi@raspberrypi:~ $ ls
A-OK_AM43_Blind_Drive Desktop Downloads Pictures Templates
Bookshelf Documents Music Public Videos"

The files are, pi@raspberrypi:~/A-OK_AM43_Blind_Drive $ ls
AOK-AM43.ini AOK-AM43.py README.md

I am getting the error message from Python exactly as listed in the Read.Me file, "ERROR: Cannot find ini file: A-OK_AM43_Blind_Drive/AOK-AM43.ini! Correct the path in this script or put the ini file in the correct directory. Exiting."

I do not see help in the discussions in the previous issues.

Can someone help, I hope I have provided enough information.

@lutierigb
Copy link

I had the same issue. TBH I don't understand the logic of the code looking for the ini file in the relative path A-OK_AM43_Blind_Drive/AOK-AM43.ini if the python script is running inside the A-OK_AM43_Blind_Drive directory. anyways, I just changed that line in the script to point to the absolute path. In your case should be ~/A-OK_AM43_Blind_Drive/AOK-AM43.ini if that doesn't work run the following commands:

cd ~
pwd

cd ~ will take you to your home directory, pwd returns the full path, edit the python script and set inifilepath to the output of pwd + /A-OK_AM43_Blind_Drive/AOK-AM43.ini

@NAP1947
Copy link
Author

NAP1947 commented Oct 7, 2020

Thank you lutierigb, sorry it has taken so long to reply but we took some time away for our anniversary.
I issued the CD~ and PWD commands which returned home/pi/
I made the suggested change for the call at line 34 to read (inifilepath = "home/pi/A-OK_AM43_Blind_Drive/AOK-AM43.ini") as you recommended.
When I run the script I get the message (ERROR: Cannot find ini file: home/pi/A-OK_AM43_Blind_Drive/AOK-AM43.ini! Correct the path in this script or put the ini file in the correct directory). Still very confused am I am sure this is just lack of experience.

@lutierigb
Copy link

should probably be /home/pi/A-OK_AM43_Blind_Drive/AOK-AM43.ini instead of home/pi/A-OK_AM43_Blind_Drive/AOK-AM43.ini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants