You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Client._request only catches json.decoder.JSONDecoderError. However, if the simplejson library is present in the environment, requests defaults to using simplejson instead of json. psf/requests#3052
Instead of catching and raising a useful message, Prefect will raise simplejson.errors.JSONDecoderError
Expected Behavior
It would be very nice if the Client could handle both cases. I'll have a draft PR coming in a minute here.
Reproduction
Install simplejson in your environment (pip install simplejson)
Make sure you log out of prefect via cli prefect auth logout
Run a hello world flow and try to register it
from prefect import task, Flow
@task
def say_hello():
print("Hello, world!")
with Flow('test') as flow:
say_hello()
flow.register(project_name='test')
Here, you'll see the simplejson error come through the stack trace instead of an error informing you about the actual issue.
Environment
pip install simplejson
The text was updated successfully, but these errors were encountered:
Description
Currently,
Client._request
only catchesjson.decoder.JSONDecoderError
. However, if thesimplejson
library is present in the environment,requests
defaults to usingsimplejson
instead ofjson
. psf/requests#3052Instead of catching and raising a useful message, Prefect will raise
simplejson.errors.JSONDecoderError
Expected Behavior
It would be very nice if the
Client
could handle both cases. I'll have a draft PR coming in a minute here.Reproduction
pip install simplejson
)prefect auth logout
Here, you'll see the
simplejson
error come through the stack trace instead of an error informing you about the actual issue.Environment
pip install simplejson
The text was updated successfully, but these errors were encountered: