Giter VIP home page Giter VIP logo

Comments (7)

Liang-KS avatar Liang-KS commented on August 16, 2024 1

oops, I deleted via command line, so I'm not able to recover those json files anymore.

but I will check again once I hit the issue again!!

one idea can be shared is maybe add "--force-refresh-metadata" as an option for debug.

thanks for your hard work, this project is absolutely awesome!!!

from camply.

juftin avatar juftin commented on August 16, 2024

hmm... πŸ€” I made big changes very recently to ReserveCalifornia in versions >= 0.23.0 so I'm very cautious about bugs, it's possible. The test here would be to try it with camply<0.23.0

But I'm not able to replicate this. Camply searches as expected, doesn't find a site, and waits 5 minutes.

❯ camply --debug campsites --provider ReserveCalifornia --campground 406 --campground 408 --campground 409 --start-date 2023-06-09 --end-date 2023-07-01 --day Saturday --notifications pushover --polling-interval 5 --search-forever
[2023-06-06 17:10:00] CAMPLY   camply, the campsite finder ⛺️
[2023-06-06 17:10:00] DEBUG    Setting up camply debugging
[2023-06-06 17:10:00] DEBUG    Camply Version: 0.24.1
[2023-06-06 17:10:00] DEBUG    Python Version: 3.9.16
[2023-06-06 17:10:00] DEBUG    Platform: darwin
[2023-06-06 17:10:00] INFO     Using Camply Provider: "ReserveCalifornia"
[2023-06-06 17:10:00] INFO     3 booking nights selected for search, ranging from 2023-06-10 to 2023-06-24
[2023-06-06 17:10:00] INFO     Searching for booking nights on Saturday
[2023-06-06 17:10:00] INFO     Searching for campsites every 5 minutes.
[2023-06-06 17:10:00] INFO     Notifications active via: <SilentNotifications>, <PushoverNotifications>
[2023-06-06 17:10:00] INFO     Searching across 3 campgrounds
[2023-06-06 17:10:00] INFO         β›°  Angel Island SP (#614) - πŸ•  East Bay (sites 1-3) (#406)
[2023-06-06 17:10:00] INFO         β›°  Angel Island SP (#614) - πŸ•  Ridge (sites 4-6) (#408)
[2023-06-06 17:10:00] INFO         β›°  Angel Island SP (#614) - πŸ•  Sunrise (sites 7-9) (#409)
[2023-06-06 17:10:00] INFO     Searching East Bay (sites 1-3), Angel Island SP (406) for availability: June, 2023
[2023-06-06 17:10:00] DEBUG    Starting new HTTPS connection (1): calirdr.usedirect.com:443
[2023-06-06 17:10:00] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2023-06-06 17:10:00] INFO             ⛺️      2 total sites found in month of June
[2023-06-06 17:10:00] INFO     Searching Ridge (sites 4-6), Angel Island SP (408) for availability: June, 2023
[2023-06-06 17:10:00] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2023-06-06 17:10:00] INFO             ❌       0 total sites found in month of June
[2023-06-06 17:10:00] INFO     Searching Sunrise (sites 7-9), Angel Island SP (409) for availability: June, 2023
[2023-06-06 17:10:01] DEBUG    https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2023-06-06 17:10:01] INFO             ⛺️      3 total sites found in month of June
[2023-06-06 17:10:01] INFO     ❌ ❌ ❌ ❌ 0 Reservable Campsites Matching Search Preferences
[2023-06-06 17:10:01] INFO     No Campsites were found, we'll continue checking

from camply.

Liang-KS avatar Liang-KS commented on August 16, 2024

Hi Juftin,

thanks for the comment, may I ask if there is a way to fully reinitialize the camply environment on my raspberryPi just like a fresh deployment? I was thinking about maybe some cache files somewhere were affecting my search, so I removed the packages and reinstalled them but no luck.

from camply.

juftin avatar juftin commented on August 16, 2024

pipx uninstall camply + pipx install camply is the best option I can think of. Can you just paste your entire terminal output, I'm interested in the command and output.

There actually are "cache" files for ReserveCalifornia. They're saved alongside the package so should disappear during a re-install. They would be in the providers/usedirect folder. So in my case they're at ~/.local/pipx/venvs/camply/lib/python3.11/site-packages/camply/providers/usedirect/ReserveCalifornia/ since I use pipx to run camply. Those files contain all the campgrounds / rec area data for ReserveCalifornia - and they would refresh every 24 hours.

from camply.

Liang-KS avatar Liang-KS commented on August 16, 2024

Hi Juftin,

thanks for letting me know the cache file location. Please see below, after I removed all the cache files, I was able to perform the search without ERROR. I think something went wrong during the data refresh. Don't know if it was a website issue or my network issue.

Again, thanks a lot for your help!!!


pi@raspberrypi:~ $ camply --debug campsites --provider ReserveCalifornia --campground 406 --campground 408 --campground 409 --start-date 2023-06-09 --end-date 2023-07-01 --day Saturday --notifications pushover --polling-interval 5 --search-forever
[2023-06-06 16:54:46] CAMPLY camply, the campsite finder ⛺️
[2023-06-06 16:54:46] DEBUG Setting up camply debugging
[2023-06-06 16:54:46] DEBUG Camply Version: 0.24.2
[2023-06-06 16:54:46] DEBUG Python Version: 3.9.2
[2023-06-06 16:54:46] DEBUG Platform: linux
[2023-06-06 16:54:46] INFO Using Camply Provider: "ReserveCalifornia"
[2023-06-06 16:54:46] INFO 3 booking nights selected for search, ranging from 2023-06-10 to 2023-06-24
[2023-06-06 16:54:46] INFO Searching for booking nights on Saturday
[2023-06-06 16:54:46] ERROR No Campsites Found Matching Your Search Criteria
[2023-06-06 16:54:46] CAMPLY Exiting camply πŸ‘‹
pi@raspberrypi:~ $

pi@raspberrypi:~/.local/lib/python3.9/site-packages/camply/providers/usedirect/ReserveCalifornia $ rm cityparks.json facilities.json filters.json places.json

pi@raspberrypi:~/.local/lib/python3.9/site-packages/camply/providers/usedirect/ReserveCalifornia $ camply --debug campsites --provider ReserveCalifornia --campground 406 --campground 408 --campground 409 --start-date 2023-06-09 --end-date 2023-07-01 --day Saturday --notifications pushover --polling-interval 5 --search-forever
[2023-06-06 16:58:04] CAMPLY camply, the campsite finder ⛺️
[2023-06-06 16:58:04] DEBUG Setting up camply debugging
[2023-06-06 16:58:04] DEBUG Camply Version: 0.24.2
[2023-06-06 16:58:04] DEBUG Python Version: 3.9.2
[2023-06-06 16:58:04] DEBUG Platform: linux
[2023-06-06 16:58:04] INFO Using Camply Provider: "ReserveCalifornia"
[2023-06-06 16:58:04] INFO 3 booking nights selected for search, ranging from 2023-06-10 to 2023-06-24
[2023-06-06 16:58:04] INFO Searching for booking nights on Saturday
[2023-06-06 16:58:04] DEBUG Refreshing UseDirect Metadata: filters.json
[2023-06-06 16:58:04] DEBUG Starting new HTTPS connection (1): calirdr.usedirect.com:443
[2023-06-06 16:58:04] DEBUG https://calirdr.usedirect.com:443 "GET /rdr/rdr/search/filters HTTP/1.1" 200 None
[2023-06-06 16:58:04] DEBUG Refreshing UseDirect Metadata: cityparks.json
[2023-06-06 16:58:04] DEBUG https://calirdr.usedirect.com:443 "GET /rdr/rdr/fd/citypark HTTP/1.1" 200 None
[2023-06-06 16:58:05] DEBUG Refreshing UseDirect Metadata: places.json
[2023-06-06 16:58:05] DEBUG https://calirdr.usedirect.com:443 "GET /rdr/rdr/fd/places HTTP/1.1" 200 None
[2023-06-06 16:58:05] DEBUG Refreshing UseDirect Metadata: facilities.json
[2023-06-06 16:58:05] DEBUG https://calirdr.usedirect.com:443 "GET /rdr/rdr/fd/facilities HTTP/1.1" 200 None
[2023-06-06 16:58:05] INFO Searching for campsites every 5 minutes.
[2023-06-06 16:58:06] INFO Notifications active via: ,
[2023-06-06 16:58:06] INFO Searching across 3 campgrounds
[2023-06-06 16:58:06] INFO β›° Angel Island SP (#614) - πŸ• East Bay (sites 1-3) (#406)
[2023-06-06 16:58:06] INFO β›° Angel Island SP (#614) - πŸ• Ridge (sites 4-6) (#408)
[2023-06-06 16:58:06] INFO β›° Angel Island SP (#614) - πŸ• Sunrise (sites 7-9) (#409)
[2023-06-06 16:58:06] INFO Searching East Bay (sites 1-3), Angel Island SP (406) for availability: June, 2023
[2023-06-06 16:58:06] DEBUG https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2023-06-06 16:58:06] INFO ⛺️ 2 total sites found in month of June
[2023-06-06 16:58:06] INFO Searching Ridge (sites 4-6), Angel Island SP (408) for availability: June, 2023
[2023-06-06 16:58:07] DEBUG https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2023-06-06 16:58:07] INFO ❌ 0 total sites found in month of June
[2023-06-06 16:58:07] INFO Searching Sunrise (sites 7-9), Angel Island SP (409) for availability: June, 2023
[2023-06-06 16:58:08] DEBUG https://calirdr.usedirect.com:443 "POST /rdr/rdr/search/grid HTTP/1.1" 200 None
[2023-06-06 16:58:08] INFO ⛺️ 3 total sites found in month of June
[2023-06-06 16:58:08] INFO ❌ ❌ ❌ ❌ 0 Reservable Campsites Matching Search Preferences
[2023-06-06 16:58:08] INFO No Campsites were found, we'll continue checking

from camply.

juftin avatar juftin commented on August 16, 2024

Oh! That's great news. Did you happen to see if they looked like legit json files? Maybe it was just a network hiccup when the files were being generated in the first place. Still, that's frustrating. Sorry about that, I'll try to come up with a better way to identify that and resolve it automatically in the future.

from camply.

juftin avatar juftin commented on August 16, 2024

Closing this as resolved for now - will reopen later if it comes up.

from camply.

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.