Skip to content

Expecting value: line 1 column 1 (char 0) #47

@AliSaeed090

Description

@AliSaeed090

Todo funciona bien en localhost. Sin embargo, después de desplegarlo en la plataforma de aplicaciones de DigitalOcean a través de un contenedor Docker, surgió este problema. El contenedor Docker funciona perfectamente en mi Mac local.

Básicamente llamando a esta función
sub=objepayco.subscriptions.get("7a1a5fa9bc9fa870f058853")

[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] Traceback (most recent call last):
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] File "/usr/src/app/app/core/epayco.py", line 292, in get_subscription
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] sub = objepayco.subscriptions.get(subscription_id)
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] File "/usr/local/lib/python3.12/site-packages/epaycosdk/resources.py", line 332, in get
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] return self.request(
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] ^^^^^^^^^^^^^
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] File "/usr/local/lib/python3.12/site-packages/epaycosdk/client.py", line 149, in request
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] authentication = auth.make(self.BASE_URL,self.BASE_URL_APIFY,apify)
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] File "/usr/local/lib/python3.12/site-packages/epaycosdk/client.py", line 107, in make
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] json_data=json.loads(data)
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] ^^^^^^^^^^^^^^^^
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] File "/usr/local/lib/python3.12/json/init.py", line 346, in loads
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] return _default_decoder.decode(s)
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] ^^^^^^^^^^^^^^^^^^^^^^^^^^
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] File "/usr/local/lib/python3.12/json/decoder.py", line 338, in decode
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] File "/usr/local/lib/python3.12/json/decoder.py", line 356, in raw_decode
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] raise JSONDecodeError("Expecting value", s, err.value) from None
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] ERROR:root:General error in get_subscription endpoint: 502: Failed to fetch subscription details from external service
[alisaeed-befree-fatsapi] [2025-02-05 22:46:24] INFO: 10.244.8.135:41772 - "GET /api/get-subscription?user_id=ILBLQn3RtFczlPxWVf5BgsbN27k2 HTTP/1.1" 500 Internal Server Error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions