chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
http://transition.city
MIT License
20 stars 13 forks source link

pyTransition : Errors in sample code #989

Open tibobliss opened 1 week ago

tibobliss commented 1 week ago

Two errors cause issues when running the sample code for _request_accessibilitymap:

image

greenscientist commented 1 week ago

Also, those code example should be included in the README from external file so that we can CI test them.

tibobliss commented 1 week ago

Another one. In the two samples for connecting to the server, the get_nodes() function is used as an example. It is called in two different ways: transition_instance.get_nodes() and Transition.get_nodes()

image

The first one gives the following error:

HTTPError: 500 Server Error: Internal Server Error for url: https://stmplanif.transition.city/api/v1/nodes (see issue #990), which means it actually manages to create a query.

While the second one gives the following error:

TypeError: Transition.get_nodes() missing 1 required positional argument: 'self'

So it seems that the first formulation should be used in all sample code.