10/18/2023 Map Stopped Working?
Visit this post for the fix
Hi all,
I'm running into a problem where I can't access the software from my computer. Just earlier today (April 6th) I got my Pi 4 set up with the software and connected to my wifi network. I got everything wired up for a successful test as well, and initially was able to access the software and played around with some of the settings. I think I made an invalid entry into one of the fields, but then shut down the Pi. When I came back to it later in the day I got the message "SyntaxError: invalid syntax" on the Pi, and when I tried to access the software I got "This site can't be reached. PiIPaddress refused to connect". I tried restarting the Pi however it didn't change anything.
I apologize if this is a simple problem to fix, I have no prior experience with Raspberry Pi or working from the command line. Any help would be greatly appreciated!
It's not problem, we are here to help. Thanks for the pictures. This told me what I needed to know.
For some reason, the value for 'leg_pin_hiwinds =' was erased in the config.py file and this is throwing an error causing the webapp.py script to stop running.
So to fix do this;
cd /NeoSectional sudo nano config.py scroll down about half way and find 'leg_pin_hiwinds =' and add a number without quotes here. For instance; leg_pin_hiwinds = 12 ctrl-X Y Then reboot; sudo reboot now
Let me know how it goes.
Mark
Thanks a lot for the fast reply Mark! Your fix worked perfectly, I got the entries fixed and was able to get back into the software right away.
I'm having this same "unable to connect" issue off and on. Last night I was able to fix it by rebooting the computer I was trying to access the RPi webapp from. The map is operating properly. I sshed into the RPi and tried to launch the webapp. This the error I get. Any ideas?
Yes, you ran it using python 2 and this is written to be run under python 3. So to run it from the cmd line issue this command;
sudo python3 webapp.py
This will run it for you. - Mark
Yes, you ran it using python 2 and this is written to be run under python 3. So to run it from the cmd line issue this command;
sudo python3 webapp.pyThis will run it for you. - Mark
That makes sense. This is what I get when I try to run it with python 3.
Nick,
You need to use the 'sudo' command;
sudo python3 webapp.py
Without the sudo, you don't have the permissions necessary to properly run the script. - Mark
The plot thickens. I see it couldn't access the log file due to permissions. Ran it as "sudo" and this is what I got. It seems to not be able to get the latitude for an airport? I assume this error is not letting the webapp launch.
Edit: We posted at the same time. Yup, got the sudo in there now.
Yep, that bug just popped up and I've got it fixed for the next image release. If you'd like you can replace the offending file with the fixed file. Just need to enter these commands on the command line;
cd /NeoSectional sudo mv webapp.py webapp.py.bkup sudo wget https://raw.githubusercontent.com/markyharris/livesectional/master/webapp.py sudo reboot now
This will backup the original webapp.py then copy the fixed version from the github repository to your directory then reboot. Let me know how it works. - Mark
Got it! Works as expected now.
I'm having the problem above where I can not log into the web app or editor.
Background is that I had my map up and running for a few months, everything was working fine. I wanted to show off the map after the "map off time" so I logged in and set the use on/off timer function to no. After that everything froze up. Convinced that I messed something up, I reflashed the SD card and tried to start over, but have been unable to get into the site since.
My router shows the device connected, but when I try to connect to the editor I get the same error as above - ERR_CONNECTION_REFUSED
I connected directly to the Rasberry PI, and this is the code that keeps running every few seconds unfortunately it doesn't mean a lot to me, but hopefully it does to you?
Hi, yes that picture tells the tale. Its telling us that you are trying to run OLED display(s) and the software is not seeing any. There is a setting, 'Display Used' under 'Basic Settings' that needs to be set to 'No'.
If you are unable to get to the web interface, you can edit the file from the command line by changing directory to /NeoSectional then opening up the config.py file in the editor;
pi@LiveSectionalV4:~ $ cd /NeoSectional pi@LiveSectionalV4:/NeoSectional $ sudo nano config.py
Find the settings;
displayused = 1 oledused = 1
And set both to 0. Then type the following to save the changes;
ctrl-x y sudo reboot now
This will save the file to its original file name. Then reboot. This should take care of the issue.
Let us know. - Mark
Thanks! I actually caught that OLED was wrong, but couldn't get to the web editor to fix it, this should do it! I'll try it tomorrow and let you know how it goes, thanks again!
Hello to who ever can help. I had a pi zero w working just fine. But tried to go on to the web page today and keep getting connection refused. So it downloaded the latest image and flashed a new sd card. And seem to have the same issue. The leds were working just fine and had no issue getting to the pi via ssh in cmd on a pc. I have tried the items Mark posted in this discussion and keep coming up with the same error. Cant tell if this is pi side issue or PC. And any help would be appreciated.
Interesting, because my boards did the same thing earlier today. I did some quick looking and found the problem is with a server that is used to house files needed for updates if necessary.
I don't know if this is a long term issue or not. I still need to do some research on that. However, if you don't mind dealing with the command line then I can give you a quick fix. Otherwise, let me know and I'll work to get a new image put together so you can download it from the web site. EDIT: Image is available for download under the Download menu item.
There are three ways to update.
First Way:
To make the quick change via the command line enter the following;
cd /NeoSectional sudo nano -c webapp.py
Scroll down to around line 1758 and find this line;
# Check to see if an newer version of the software is available, and update if user so chooses testupdate()
And comment out the 'testupdate()' line with a '#' so that it looks like this;
# Check to see if an newer version of the software is available, and update if user so chooses # testupdate()
Then save changes by typing;
ctrl-x y sudo reboot now
This will save the file then reboot the pi. You should now have access to the web interface.
2nd Way:
Enter the following from the command line. The RPi must have internet access for this way to work.
cd /NeoSectional sudo mv webapp.py webapp.py.orig sudo wget https://raw.githubusercontent.com/markyharris/livesectional/master/webapp.py sudo reboot now
This renames the original file then downloads the updated version of the webapp.py file from github, then reboots.
3rd Way:
You can download the updated image from https://www.livesectional.com/downloads/. Ideally, you would have copies of the config.py, airports and hmdata files to make the upgrade quicker. - Mark