freyta / 7Eleven-Python

A python script to check fuel prices and also lock them in
GNU General Public License v3.0
128 stars 63 forks source link

Internal Server Error #44

Closed gyrex closed 4 years ago

gyrex commented 4 years ago

Hi guys,

I seem to have an issue with the app, not sure what's changed - it was working earlier today and I don't think I've made any changes. This is the error message reported from my browser:

Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Log:

[2019-12-03 00:03:56,752] ERROR in app: Exception on / [GET] Traceback (most recent call last): File "/home/john/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/john/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/john/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/john/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/john/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/john/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "app.py", line 96, in index fuelPrice = functions.cheapestFuelAll() File "/home/john/7Eleven-Python/functions.py", line 96, in cheapestFuelAll response = json.loads(r.text) File "/usr/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 10.8.0.6 - - [03/Dec/2019 00:03:56] "GET / HTTP/1.1" 500 -

Would really appreciate any help, thanks!

billyourself commented 4 years ago

Same issue here. Appears to be a very recent problem. Appeared approx 2 hours ago.

NGPriest commented 4 years ago

Have you tried turning it off and on again?

billyourself commented 4 years ago

Have you tried turning it off and on again?

In case you aren't joking, yes.

freyta commented 4 years ago

Is it still happening? Mine seems to load fine..

7Eleven-Python]$ python app.py 
Note: You have not set an API key. You will not be able to use Google to find a stores coordinates.
But you can still use the manual search if you know the postcode to the store you want to lock in from.

Note: You have not set a device ID. A random one will be set when you login.
Note: Opening stores.json
 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
127.0.0.1 - - [03/Dec/2019 06:26:43] "GET /?action=refresh HTTP/1.1" 200 -
127.0.0.1 - - [03/Dec/2019 06:26:43] "GET /static/css/style.css HTTP/1.1" 304 -
127.0.0.1 - - [03/Dec/2019 06:26:43] "GET /static/images/7-eleven_logo.svg HTTP/1.1" 304 -
127.0.0.1 - - [03/Dec/2019 06:26:43] "GET /static/fonts/PoiretOne-Regular.ttf HTTP/1.1" 304 -

Can you directly access the API? What happens when you try to browse to https://projectzerothree.info/api.php?format=json ?

MattKobayashi commented 4 years ago

Hey all, I did see exactly the same thing as @gyrex last night when I checked my install, but it seems to be working properly now. It's possible that Tigerspike were doing some work on the back-end systems for the fuel lock app that caused the issue at the time.

gyrex commented 4 years ago

Yep, mine is working now too. What's Tigerspike?

MattKobayashi commented 4 years ago

Tigerspike is the third-party company that 7-Eleven has contracted to operate the Fuel Lock app and associated systems.

gyrex commented 4 years ago

Tigerspike is the third-party company that 7-Eleven has contracted to operate the Fuel Lock app and associated systems.

Thanks mate! I think you've nailed down the issue :)

I'll close this case.