FIWARE NGSI APIv2 Walkthrough document update
Closed this issue · 4 comments
When I am trying to run below APIs copied from FIWARE NGSI APIv2 Walkthrough
document, I'm getting below error.
API:
curl localhost:1026/v2/entities/Room1?type=Room -s -S -H 'Accept: application/json' | python -mjson.tool
Error:
Command 'python' not found, did you mean:
command 'python3' from deb python3
command 'python' from deb python-is-python3
Above error is occurring due to python
used in API instead of python3
.
So I think the APIs should be updated with python3
in FIWARE NGSI APIv2 Walkthrough
document as below:
updated API:
curl localhost:1026/v2/entities/Room1?type=Room -s -S -H 'Accept: application/json' | python3 -mjson.tool
@fgalan Please provide your opinion. If my understanding is correct, I'll raise a PR to update the doc.
PR #4520
The exact name of the Python executable would depend on the environment (in particular, the operating system and the usage or not of virtual env).
For instance, in my case, using Debian 12.4, both works, depending the case:
fermin@bodoque:~$ python --version
bash: python: orden no encontrada
fermin@bodoque:~$ python3 --version
Python 3.11.2
fermin@bodoque:~$ . ~/src/venv/p3/bin/activate
(p3) fermin@bodoque:~$ python --version
Python 3.11.2
Thus, I think it would better to include a clarification about this in the beginning of the document (as the one in PR #4524).
@ArqamFarooqui110719 what do you think?
Yes, it'd also be a good point to add a clarification