Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyTransition : Errors in sample code #989

Closed
tibobliss opened this issue Jun 25, 2024 · 4 comments · Fixed by #1171
Closed

pyTransition : Errors in sample code #989

tibobliss opened this issue Jun 25, 2024 · 4 comments · Fixed by #1171
Assignees
Labels
python Python library related issues

Comments

@tibobliss
Copy link

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

  • lat/long are inverted
  • there is a trailing comma at the end of the parameters

image

@greenscientist greenscientist added the python Python library related issues label Jun 25, 2024
@greenscientist
Copy link
Collaborator

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

@greenscientist greenscientist self-assigned this Jun 25, 2024
@tibobliss
Copy link
Author

tibobliss commented Jun 25, 2024

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.

@greenscientist
Copy link
Collaborator

#1171 add a method to link actual script to the README to ease in testing.
Some fixes were applied

@greenscientist
Copy link
Collaborator

the trailling comma is not an issue in Python, but the other errors were fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Python library related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants