Closed zhazell closed 7 months ago
Thanks for reporting this. It's been a while since I've worked with the Yellowstone provider, sounds like their API is returning inconsistent results. I'll dig into this and see if I can't get it fixed up soon.
May not be related but I was looking over the console logs as it was running and noticed that it seems to be searching 3 campgrounds and I only specified two. YLYM and YLYF, but it's also doing an API call for YLYB (Bridge Bay Campground).
[2024-05-01 08:45:41] INFO 2 Matching Campgrounds Found
[2024-05-01 08:45:41] INFO โฐ Yellowstone National Park, USA (#1) - ๐ Madison Campground (YLYM:RV)
[2024-05-01 08:45:41] INFO โฐ Yellowstone National Park, USA (#1) - ๐ Fishing Bridge RV Park (YLYF:RV)
[2024-05-01 08:45:41] INFO Searching for Yellowstone Lodging Availability: June, 2024
[2024-05-01 08:45:41] DEBUG Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 08:45:46] DEBUG https://webapi.xanterra.net:443 "GET /v1/api/availability/hotels/yellowstonenationalparklodges?date=2024-06-01&limit=31&rate_code=INTERNET&nights=3 HTTP/1.1" 200 None
[2024-05-01 08:45:47] INFO โบ๏ธ 4 sites found.
[2024-05-01 08:45:47] DEBUG Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 08:45:48] DEBUG https://webapi.xanterra.net:443 "GET /v1/api/availability/rooms/yellowstonenationalparklodges/YLYB:RV?date=2024-06-01&limit=31&nights=3 HTTP/1.1" 200 None
[2024-05-01 08:45:48] DEBUG Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 08:45:49] DEBUG https://webapi.xanterra.net:443 "GET /v1/api/availability/rooms/yellowstonenationalparklodges/YLYF:RV?date=2024-06-01&limit=31&nights=3 HTTP/1.1" 200 None
[2024-05-01 08:45:49] DEBUG Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 08:45:50] DEBUG https://webapi.xanterra.net:443 "GET /v1/api/availability/rooms/yellowstonenationalparklodges/YLYM:RV?date=2024-06-01&limit=31&nights=3 HTTP/1.1" 200 None
[2024-05-01 08:45:51] DEBUG Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 08:45:51] DEBUG https://webapi.xanterra.net:443 "GET /v1/api/property/rooms/yellowstonenationalparklodges/YLYB:RV HTTP/1.1" 200 None
[2024-05-01 08:45:51] DEBUG Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 08:45:52] DEBUG https://webapi.xanterra.net:443 "GET /v1/api/property/rooms/yellowstonenationalparklodges/YLYF:RV HTTP/1.1" 200 None
[2024-05-01 08:45:52] DEBUG Starting new HTTPS connection (1): webapi.xanterra.net:443
[2024-05-01 08:45:53] DEBUG https://webapi.xanterra.net:443 "GET /v1/api/property/rooms/yellowstonenationalparklodges/YLYM:RV HTTP/1.1" 200 None
[2024-05-01 08:45:53] INFO โ โ โ โ 0 Reservable Campsites Matching Search Preferences
[2024-05-01 08:45:53] INFO No Campsites were found, we'll continue checking````
Looks like the API for Yellowstone had some kind of behavior change. Rather than returning {"availability": {}}
when no availabilities are found it started returning {"availability": []}
I was only able to replicate this once, but I can see it in your debug logging:
โ /home/zach/.local/pipx/venvs/camply/lib/python3.10/site-packages/camply/providers/xanterra/yello โ
โ wstone_lodging.py:417 in get_monthly_campsites โ
โ โ
โ 414 โ โ availability_found = self._get_monthly_availability( โ
โ 415 โ โ โ month=search_date, nights=nights โ
โ 416 โ โ ) โ
โ โฑ 417 โ โ availability = XantResortData(**availability_found) โ
โ 418 โ โ monthly_campsites = self._compile_campground_availabilities( โ
โ 419 โ โ โ availability=availability โ
โ 420 โ โ ) โ
โ โ
โ โญโโโโโโโโโโโโโโโโโโโโ locals โโโโโโโโโโโโโโโโโโโโโฎ โ
โ โ availability_found = {'availability': []} โ โ
โ โ month = datetime.date(2024, 6, 1) โ โ
โ โ nights = 3 โ โ
โ โ now = datetime.date(2024, 5, 1) โ โ
โ โ search_date = datetime.date(2024, 6, 1) โ โ
โ โ self = <Yellowstone> โ โ
โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ โ
https://github.com/juftin/camply/pull/346 will resolve this
The PR will auto-close this issue when it's merged momentarily and you can resolve this on your end by upgrading camply to the newest version. Please let me know if you encounter any other issues ๐ค
:tada: This issue has been resolved in version 0.32.6 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Describe the bug
When having a continuous scan run, it seems to error quite frequently with "list object has no attribute items" error. Requires me to start the command again. It has happened over the last 2 weeks a dozen times.
Original Camply Command (with
--debug
)camply --provider Yellowstone campsites --campground YLYF:RV --campground YLYM:RV --start-date 2024-06-13 --end-date 2024-06-16 --nights 3 --search-forever --notifications pushover --polling-interval 5 --debug
Additional context