Giter VIP home page Giter VIP logo

Comments (11)

jdholtz avatar jdholtz commented on September 14, 2024

Thanks for reporting this quickly. What fare is this flight under? Also, does Southwest's website show the correct prices/points when you check for fares on their website?

from auto-southwest-check-in.

pltrant avatar pltrant commented on September 14, 2024

Hi. The fare is under Wanna Get Away. It's multiple tickets under my account (for family members - all under the same reservation number).

I can manually check my reservation and check for a change of flight to see any price differences for changing the flight.

from auto-southwest-check-in.

jdholtz avatar jdholtz commented on September 14, 2024

Does this bug happen for every single one of the reservations?

Unfortunately, this is hard to debug on my end because I am not seeing the issue and a lot of the information that the script grabs for fare checking is private. If you do have some experience with Python and/or web scraping, it would be very helpful for you to look further into this if you have time.

from auto-southwest-check-in.

pltrant avatar pltrant commented on September 14, 2024

Here's the entire output (but edited names/locations) when ran:

Successfully logged in to Soandso's account

Successfully scheduled the following flights to check in for Soandso (edited out names and actual locations):
Flight from Denver to Phoenix at 2023-06-14 11:00:00 UTC
Flight from Phoenix to Denver at 2023-06-24 20:35:00 UTC

Unexpected error during fare check: TypeError("'NoneType' object is not iterable")
Traceback (most recent call last):
  File "C:\auto-southwest-check-in\lib\flight_retriever.py", line 78, in _check_flight_fares
    fare_checker.check_flight_price(flight)
  File "C:\auto-southwest-check-in\lib\fare_checker.py", line 31, in check_flight_price
    flight_price = self._get_flight_price(flight)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\auto-southwest-check-in\lib\fare_checker.py", line 50, in _get_flight_price
    return self._get_matching_fare(new_flight["fares"], fare_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\auto-southwest-check-in\lib\fare_checker.py", line 144, in _get_matching_fare
    for fare in fares:
TypeError: 'NoneType' object is not iterable

Here's the log:

2023-05-08 09:08:08 DEBUG MainProcess[main]: Called with 0 arguments
2023-05-08 09:08:09 DEBUG MainProcess[config]: Reading the configuration file
2023-05-08 09:08:09 DEBUG MainProcess[config]: Adding 1 accounts from configuration file
2023-05-08 09:08:09 DEBUG MainProcess[config]: Setting check fares to True
2023-05-08 09:08:09 DEBUG MainProcess[config]: Setting notification level to 1
2023-05-08 09:08:09 DEBUG MainProcess[config]: Using 1 notification services
2023-05-08 09:08:09 DEBUG MainProcess[config]: Setting retrieval interval to 24 hours
2023-05-08 09:08:09 DEBUG MainProcess[main]: Monitoring 1 accounts and 0 flights
2023-05-08 09:08:09 DEBUG Process-1[flight_retriever]: Retrieving flights for account
2023-05-08 09:08:09 DEBUG Process-1[webdriver]: Starting webdriver for current session
2023-05-08 09:08:11 DEBUG Process-1[webdriver]: Loading Southwest Check-In page
2023-05-08 09:08:17 DEBUG Process-1[webdriver]: Logging into Southwest account to get scheduled flights and valid headers
2023-05-08 09:08:18 DEBUG Process-1[webdriver]: Setting valid headers from previous request
2023-05-08 09:08:18 DEBUG Process-1[webdriver]: First time logging in. Setting account name
2023-05-08 09:08:19 DEBUG Process-1[flight_retriever]: Successfully retrieved 1 flights
2023-05-08 09:08:19 DEBUG Process-1[flight_retriever]: Scheduling reservations for 1 flights
2023-05-08 09:08:19 DEBUG Process-1[checkin_scheduler]: Retrieving reservation info from confirmation number
2023-05-08 09:08:21 DEBUG Process-1[checkin_scheduler]: Successfully retrieved reservation info
2023-05-08 09:08:21 DEBUG Process-1[checkin_scheduler]: 2 flights found under current reservation
2023-05-08 09:08:21 DEBUG Process-1[checkin_scheduler]: New flight found. Handling check-in
2023-05-08 09:08:21 DEBUG Process-1[checkin_handler]: Scheduling check-in for current flight
2023-05-08 09:08:21 DEBUG Process-1[checkin_scheduler]: New flight found. Handling check-in
2023-05-08 09:08:21 DEBUG Process-1[checkin_handler]: Scheduling check-in for current flight
2023-05-08 09:08:21 DEBUG Process-1[notification_handler]: Sending new flights notification
2023-05-08 09:08:22 DEBUG Process-1[checkin_scheduler]: Removing departed flights. Currently have 2 flights scheduled
2023-05-08 09:08:22 DEBUG Process-1[checkin_scheduler]: Successfully removed departed flights. 2 flights are now scheduled
2023-05-08 09:08:22 DEBUG Process-1[flight_retriever]: Checking fares for 2 flights
2023-05-08 09:08:22 DEBUG Process-1[fare_checker]: Checking current price for flight
2023-05-08 09:08:22 DEBUG Process-1[fare_checker]: Fetching reservation information
2023-05-08 09:08:22 DEBUG Process-1:1[checkin_handler]: Sleeping until ten minutes before check-in...
2023-05-08 09:08:22 DEBUG Process-1:2[checkin_handler]: Sleeping until ten minutes before check-in...
2023-05-08 09:08:24 DEBUG Process-1[fare_checker]: Retrieving search information for the current flight
2023-05-08 09:08:26 DEBUG Process-1[fare_checker]: Retrieving matching flights
2023-05-08 09:08:28 DEBUG Process-1[fare_checker]: Found 2 matching flights
2023-05-08 09:08:28 ERROR Process-1[flight_retriever]: Unexpected error during fare check: TypeError("'NoneType' object is not iterable")
Traceback (most recent call last):
  File "C:\auto-southwest-check-in\lib\flight_retriever.py", line 78, in _check_flight_fares
    fare_checker.check_flight_price(flight)
  File "C:\auto-southwest-check-in\lib\fare_checker.py", line 31, in check_flight_price
    flight_price = self._get_flight_price(flight)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\auto-southwest-check-in\lib\fare_checker.py", line 50, in _get_flight_price
    return self._get_matching_fare(new_flight["fares"], fare_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\auto-southwest-check-in\lib\fare_checker.py", line 144, in _get_matching_fare
    for fare in fares:
TypeError: 'NoneType' object is not iterable
2023-05-08 09:08:28 DEBUG Process-1[fare_checker]: Checking current price for flight
2023-05-08 09:08:28 DEBUG Process-1[fare_checker]: Fetching reservation information
2023-05-08 09:08:30 DEBUG Process-1[fare_checker]: Retrieving search information for the current flight
2023-05-08 09:08:32 DEBUG Process-1[fare_checker]: Retrieving matching flights
2023-05-08 09:08:35 DEBUG Process-1[fare_checker]: Found 2 matching flights
2023-05-08 09:08:35 DEBUG Process-1[fare_checker]: Flight price change found for +1 USD
2023-05-08 09:08:35 DEBUG Process-1[flight_retriever]: Sleeping for 86374 seconds

from auto-southwest-check-in.

jdholtz avatar jdholtz commented on September 14, 2024

Thanks for the logs. That’s good to know that it is still working for the return flight.

Just to verify, there is a price difference on the website for the outbound flight (the first one), not only the returning flight?

To debug this a little further, can you add print(new_flight["startingFromPriceDifference"]) on line 50 of lib/fare_checker.py and paste the output you get (it might be None or something like {amount: …})?

from auto-southwest-check-in.

pltrant avatar pltrant commented on September 14, 2024

For the outbound flight, there's no tickets available under the Wanna Get Away fare type (but there is for the higher fare types). For the return flight, there are still tickets available under the Wanna Get Away fare type (that cost $1 more).

Adding print(new_flight["startingFromPriceDifference"]) resulted in this error: Unexpected error during fare check: KeyError('startingFromPriceDifference'). I then changed it print(new_flight), which results in (edited some of the values for privacy):

{'departureTime': '08:00',
'arrivalTime': '12:40',
'duration': '6h 40m',
'stopDescription': '1 Stop, STL',
'stopDescriptionOnSelect': '1 Stop, Change planes STL',
'shortStopDescription': '1 Stop',
'stopCity': 'STL',
'flightNumbers': '1234/5678',
'fareDifferences': ['unavailable',
    'unavailable',
    'unavailable',
    'unavailable',
    'unavailable',
    'unavailable'],
'startingFromPrice': None,
'startingFromPricePointTax': None,
'dynamicWaiverAvailabilityText': None,
'reasonIfUnavailable': 'Unavailable',
'discountedStartingFromPrice': None,
'discountedStartingFromPriceTax': None,
'fares': None,
'_meta': {'cardId': 'DEN:PHX:0:2023-06-14',
    'durationMinutes': 520,
    'numberOfStops': 1,
    'startingFromAmount': 0,
    'departureTime': '0800'},
'isNextDayArrival': False,
'hasLowestFare': False}

from auto-southwest-check-in.

jdholtz avatar jdholtz commented on September 14, 2024

Thanks for printing new_flight as that gives me a very good idea of what is going on. I’ll make a fix for this. Thanks for debugging this so thoroughly.

from auto-southwest-check-in.

pltrant avatar pltrant commented on September 14, 2024

Sure. Looking forward the new feature! Once you have it available on a new branch, let me know and I can test it.

from auto-southwest-check-in.

jdholtz avatar jdholtz commented on September 14, 2024

Hey @pltrant, I added a potential fix on the handle_no_fares branch. Could you switch to that branch and let me know if it fixes the issue for you?

I decided to report back a price difference of 0 USD/Points because the fare is no longer available (sold out).

from auto-southwest-check-in.

pltrant avatar pltrant commented on September 14, 2024

Hi @jdholtz. That does appear to have resolved the issue. Thanks!

from auto-southwest-check-in.

jdholtz avatar jdholtz commented on September 14, 2024

Thanks for testing!

from auto-southwest-check-in.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.