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
"Object of type Passenger is not JSON serializable"
Here is the complete error:
nj.findOffers("Wien","Rom",datetime.date(2024,6,1),oebb.MA)
Traceback (most recent call last):
File "", line 1, in
File "/Users/vthoss/Jupyter/main.py", line 131, in findOffers
response = self.__session.post(
^^^^^^^^^^^^^^^^^^^^
File "/Users/vthoss/anaconda3/lib/python3.11/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vthoss/anaconda3/lib/python3.11/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vthoss/anaconda3/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/Users/vthoss/anaconda3/lib/python3.11/site-packages/requests/models.py", line 371, in prepare
self.prepare_body(data, files, json)
File "/Users/vthoss/anaconda3/lib/python3.11/site-packages/requests/models.py", line 511, in prepare_body
body = complexjson.dumps(json, allow_nan=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vthoss/anaconda3/lib/python3.11/json/init.py", line 238, in dumps
**kw).encode(obj)
^^^^^^^^^^^
File "/Users/vthoss/anaconda3/lib/python3.11/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vthoss/anaconda3/lib/python3.11/json/encoder.py", line 258, in iterencode
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
File "/Users/vthoss/anaconda3/lib/python3.11/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type Passenger is not JSON serializable
The text was updated successfully, but these errors were encountered:
I get the error
"Object of type Passenger is not JSON serializable"
Here is the complete error:
The text was updated successfully, but these errors were encountered: