Coder Social home page Coder Social logo

nightjetter's Issues

Issue with "Filtered" function

The OffersFiltered function does not seem to work properly anymore, maybe because the output of nightjet.com has changed?

Thanks for your help :) Really appreciate your code!

PyError ($(Expr(:escape, :(ccall(#= /Users/XXX/.julia/packages/PyCall/ilqDX/src/pyfncall.jl:43 =# @pysym(:PyObject_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) <class 'TypeError'>
TypeError("string indices must be integers, not 'str'")
  File "/Users/XXX/./main.py", line 122, in findOffersFiltered
    if "Kein Storno" in offer["prodGroupLabels"]:

Code not working due to passenger issue

I get the error

"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

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.