-
Notifications
You must be signed in to change notification settings - Fork 1
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
Atlanta Location Not Working #3
Comments
Hi @SummitPatel This looks like its an issue with the plyer package. A simple quick and dirty fix would be to comment out the I've found another issue which says it may just be a wrong import or an unknown platform, see here kivy/plyer#485 And yes, it would indeed run for JFK and LAX, but as they are super busy it is skipping the notification line since there are no openings... at least when you ran the script. I would say first do the print statement, see that it returns, and then work on the issue with the unknown platform. If you create a PR I can happily merge it if you find out what the resolution is. |
Maybe this would work? CedArctic/Chimera@5b73b61 |
Hi @billy-doyle So I commented out the line you suggested and it's printing to terminal without issue now! I think the I think it might be important to call out that I am using the fish shell, so when I ran the Requirement already satisfied: requests in ./venv/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (2.28.1)
Requirement already satisfied: plyer in ./venv/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (2.0.0)
Requirement already satisfied: idna<4,>=2.5 in ./venv/lib/python3.9/site-packages (from requests->-r requirements.txt (line 1)) (3.3)
Requirement already satisfied: charset-normalizer<3,>=2 in ./venv/lib/python3.9/site-packages (from requests->-r requirements.txt (line 1)) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.9/site-packages (from requests->-r requirements.txt (line 1)) (2022.6.15)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in ./venv/lib/python3.9/site-packages (from requests->-r requirements.txt (line 1)) (1.26.11)
WARNING: There was an error checking the latest version of pip. So everything seems good from what I can tell and you can see that I have |
So I would first create a new file, maybe call it from plyer import notification
print(notification.notify(title='TEST', message='Testing plyer', timeout=3)) Hence, this has narrowed down the issue to a problem with the plyer package installed on your system (unsure if related to fish to be honest). It is just a convenience function to display a notification on your operating system (think like if you get an email or a slack, it pops up in a corner of your screen) and is not required for the script to properly operate. What I would try to get plyer working is what I have linked above, namely add import os
from plyer import notification
os.system("osascript -e 'display notification \"{}\"\'".format(txt))
print(notification.notify(title='TEST', message='Testing plyer', timeout=3)) If this works, then change in import sys
import time
import requests
from plyer import notification
# def fetch()..... to this import os
import sys
import time
import requests
from plyer import notification
os.system("osascript -e 'display notification \"{}\"\'".format(txt))
# def fetch()..... As for this comment "When running against JFK/LAX, the script was just hanging for a long time (to me this looked like it was working). Not sure why when I ran against ATL that it immediately crashed and gave me that error log, but JFK/LAX eventually timed out with the same error." This is expected, mainly because JFK and LAX are very busy and thus typically no appointments are available, and new appointments become available if people cancel their appointment. But at a less busy airport such as ATL, an appointment may already be available and therefore immediately throw the error because it tries to notify. Hope this helps narrow down the issue for you. |
That makes sense, appreciate the clarification on this. So I followed your other steps and can confirm it's the plyer package. I was able to get a system notification to pop up using Thanks for your help on this! I'll submit a PR shortly for you to review if you'd like to incorporate this change into your repo. |
Hi there,
First off, thanks for making this tool! I'm currently trying to use this to get an appointment at the Enrollment Center in the Atlanta airport. I've downloaded the project, followed your instructions in the README, and it seems to be working for the JFK and LAX (the script seems to be running but I will confess I haven't seen anything come through so I'm not 100% sure).
However, when I try to run the script against the ATL location with
python3 global_entry.py 5182
, I receive this error and the script terminates.I'm not a python dev so I'm not sure what to make of this, but let me know if you need more information and I can help troubleshoot this with you
The text was updated successfully, but these errors were encountered: