-
Notifications
You must be signed in to change notification settings - Fork 15
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
Cookies & parse_response issues with V1 #3
Comments
Hey there, Could you please clarify what "Cookies reference is not working" mean? As for the broken P.S. I was in a rush so I wasn't aware of my code being that broken, thanks for pointing this out. I'll look into the code tomorrow (if possible). Thanks! Best |
Ope, tack that back, when I do that it gives this error: Process finished with exit code 1 |
But anyways this is the error code for running it without the cookies line, that is the issue with parsing the response which seems to be the bigger problem (I haven't encountered any need for the cookies thing yet anyway): Traceback (most recent call last): Process finished with exit code 1 Now you mentioned a log file? I'm assuming you mean adding code that saves out errors like this to a log / txt file so that I don't have to copy past efrom the output screen? That is a good idea I should do that. |
Hi there, I've updated
pip install -U fast-flights Let me know if I made other silly mistakes! Best, |
Alright new, and even wierder, parse response error. Old ones seem to to be resolved Traceback (most recent call last): Process finished with exit code 1 But here's what's wierd I went in and added some print statements to the nonstop parse / code and got this for this same code / result: 1 stop So I have no clue how it's parsing / splitting out an empty string? '' Freaking wierd. Here is my code just to be sure: from fast_flights import FlightData, Passengers, create_filter, get_flights, Cookies Create a new filterfilter1 = create_filter( Get flights with a filterresult = get_flights( The price is currently... low/typical/highprint("The price is currently", result.current_price) Display the first flightprint(result.flights[1]) |
Tried a few different dates and airports |
Hi, @JobeOneKenobi. I'm helping the flights team manage their backlog and am marking this issue as stale. You've raised concerns about two main problems with the V1 functionality: the Could you please let the flights team know if this issue is still relevant to the latest version of the repository? If it is, a comment from you would be appreciated. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! |
Hey! What's the latest release, still 1.2? Paused testing for awhile but I
can take a look at it this weekend. I believe it was resolved or I figured
out a fix for it. Thx!
…On Thu, Oct 31, 2024 at 12:10 PM dosubot[bot] ***@***.***> wrote:
Hi, @JobeOneKenobi <https://github.com/JobeOneKenobi>. I'm helping the
flights team manage their backlog and am marking this issue as stale.
You've raised concerns about two main problems with the V1 functionality:
the Cookies.new() line not working and an IndexError occurring in the
parse_response function. AWeirdDev suggested updating to version 1.2,
which resolved some errors but introduced a new ValueError related to
parsing stops. I see that you're actively testing different scenarios and
providing detailed error logs to assist in troubleshooting.
Could you please let the flights team know if this issue is still relevant
to the latest version of the repository? If it is, a comment from you would
be appreciated. Otherwise, feel free to close the issue yourself, or it
will be automatically closed in 7 days. Thank you!
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BDGRANBSL3OV4DWIO7EVFGLZ6JI5XAVCNFSM6AAAAABK3NF4AKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJQGI3DMOJRGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@AWeirdDev, the user JobeOneKenobi has indicated that they paused testing but can take a look at the issue this weekend, suggesting they may have found a fix. Could you please assist them with the concerns regarding the V1 functionality? Thank you! |
V1 works the same using the v0 functionality, but when I try the new formatting for the get_flights, two issues:
I'm testing it in an isolated environment with a simple main script, and installed it with pip only here is my test code
from fast_flights import FlightData, Passengers, create_filter, get_flights
Create a new filter
filter = create_filter(
flight_data=[
# Include more if it's not a one-way trip
FlightData(
date="2024-09-02", # Date of departure
from_airport="RSW",
to_airport="DCA"
),
# ... include more for round trips and multi-city trips
],
trip="one-way", # Trip (round-trip, one-way, multi-city)
seat="economy", # Seat (economy, premium-economy, business or first)
passengers=Passengers(
adults=1,
children=0,
infants_in_seat=0,
infants_on_lap=0
),
)
Get flights with a filter
result = get_flights(
filter,
dangerously_allow_looping_last_item=True,
cookies=Cookies.new().to_dict(),
currency="USD",
language="en"
)
The price is currently... low/typical/high
print("The price is currently", result.current_price)
Display the first flight
print(result.flights[0])
The text was updated successfully, but these errors were encountered: