Skip to content
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

ConnectionError: HTTPSConnectionPool(host='camping.bcparks.ca', port=443): Max retries exceeded with url: /api/availability/map?mapId=-2147483647&resourceLocationId=-2147483647&bookingCategoryId=0&startDate=2024-07-27&endDate=2024-09-02& isReserving=True&getDailyAvailability=False&partySize=1&numEquipment=1&equipmentCategoryId=-32768 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b0f418d7010>: Failed to establish a new connection: [Errno 101] Network is unreachable')) #355

Closed
KyleSanderson opened this issue Jul 27, 2024 · 1 comment
Assignees
Labels
bug Something isn't working triage This will looked at

Comments

@KyleSanderson
Copy link

Describe the bug

│ /usr/local/lib/python3.11/site-packages/camply/providers/going_to_camp/going_to_camp_provider.py │
│ :522 in list_site_availability                                                                   │
│                                                                                                  │
│   519 │   │   if equipment_type_id:                                                              │
│   520 │   │   │   search_filter["subEquipmentCategoryId"] = equipment_type_id                    │
│   521 │   │                                                                                      │
│ ❱ 522 │   │   resources, additional_resources = self._find_matching_resources(                   │
│   523 │   │   │   campground.recreation_area_id, search_filter                                   │
│   524 │   │   )                                                                                  │
│   525                                                                                            │
│                                                                                                  │
│ /usr/local/lib/python3.11/site-packages/camply/providers/going_to_camp/going_to_camp_provider.py │
│ :448 in _find_matching_resources                                                                 │
│                                                                                                  │
│   445 │   │   return facility, campground_facility                                               │
│   446 │                                                                                          │
│   447 │   def _find_matching_resources(self, rec_area_id: int, search_filter: Dict[str, any]):   │
│ ❱ 448 │   │   results = self._api_request(rec_area_id, "MAPDATA", search_filter)                 │
│   449 │   │   availability_details = {                                                           │
│   450 │   │   │   search_filter["mapId"]: results["resourceAvailabilities"]                      │
│   451 │   │   }                                                                                  │
│                                                                                                  │
│ /usr/local/lib/python3.11/site-packages/camply/providers/going_to_camp/going_to_camp_provider.py │
│ :341 in _api_request                                                                             │
│                                                                                                  │
│   338 │   │   │   "User-Agent": UserAgent(browsers=["chrome"]).random,                           │
│   339 │   │   │   "Accept-Language": "en-US,en;q=0.9",                                           │
│   340 │   │   }                                                                                  │
│ ❱ 341 │   │   response = self.session.get(url=url, headers=headers, params=params, timeout=30)   │
│   342 │   │   if response.ok is False:                                                           │
│   343 │   │   │   error_message = f"Receiving bad data from GoingToCamp API: status_code: {res   │
│   344 │   │   │   logger.error(error_message)                                                    │
│                                                                                                  │
│ /usr/local/lib/python3.11/site-packages/requests/sessions.py:602 in get                          │
│                                                                                                  │
│   599 │   │   """                                                                                │
│   600 │   │                                                                                      │
│   601 │   │   kwargs.setdefault("allow_redirects", True)                                         │
│ ❱ 602 │   │   return self.request("GET", url, **kwargs)                                          │
│   603 │                                                                                          │
│   604 │   def options(self, url, **kwargs):                                                      │
│   605 │   │   r"""Sends a OPTIONS request. Returns :class:`Response` object.                     │
│                                                                                                  │
│ /usr/local/lib/python3.11/site-packages/requests/sessions.py:589 in request                      │
│                                                                                                  │
│   586 │   │   │   "allow_redirects": allow_redirects,                                            │
│   587 │   │   }                                                                                  │
│   588 │   │   send_kwargs.update(settings)                                                       │
│ ❱ 589 │   │   resp = self.send(prep, **send_kwargs)                                              │
│   590 │   │                                                                                      │
│   591 │   │   return resp                                                                        │
│   592                                                                                            │
│                                                                                                  │
│ /usr/local/lib/python3.11/site-packages/requests/sessions.py:703 in send                         │
│                                                                                                  │
│   700 │   │   start = preferred_clock()                                                          │
│   701 │   │                                                                                      │
│   702 │   │   # Send the request                                                                 │
│ ❱ 703 │   │   r = adapter.send(request, **kwargs)                                                │
│   704 │   │                                                                                      │
│   705 │   │   # Total elapsed time of the request (approximately)                                │
│   706 │   │   elapsed = preferred_clock() - start                                                │
│                                                                                                  │
│ /usr/local/lib/python3.11/site-packages/requests/adapters.py:519 in send                         │
│                                                                                                  │
│   516 │   │   │   │   # This branch is for urllib3 v1.22 and later.                              │
│   517 │   │   │   │   raise SSLError(e, request=request)                                         │
│   518 │   │   │                                                                                  │
│ ❱ 519 │   │   │   raise ConnectionError(e, request=request)                                      │
│   520 │   │                                                                                      │
│   521 │   │   except ClosedPoolError as e:                                                       │
│   522 │   │   │   raise ConnectionError(e, request=request)                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ConnectionError: HTTPSConnectionPool(host='camping.bcparks.ca', port=443): Max retries exceeded with url:
/api/availability/map?mapId=-2147483647&resourceLocationId=-2147483647&bookingCategoryId=0&startDate=2024-07-27&endDate=2024-09-02&
isReserving=True&getDailyAvailability=False&partySize=1&numEquipment=1&equipmentCategoryId=-32768 (Caused by
NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7b0f418d7010>: Failed to establish a new connection: [Errno
101] Network is unreachable'))
Error: while running runtime: exit status 1

Additional context

< Add any other context about the problem here. >
#354

@KyleSanderson KyleSanderson added the bug Something isn't working label Jul 27, 2024
@github-actions github-actions bot added the triage This will looked at label Jul 27, 2024
@juftin
Copy link
Owner

juftin commented Jul 29, 2024

Closing this as a duplicate of #354, I'll add some more context there but it seems like camping.bcparks.ca experienced downtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This will looked at
Projects
None yet
Development

No branches or pull requests

2 participants