invalid syntax (self.method)
Toni1989 opened this issue · 5 comments
Hi all,
get the error:
~$ python huami_token.py --method xiaomi --bt_keys
python: can't open file 'huami_token.py': [Errno 2] No such file or directory
Some Idea?
Greetings
I understood that I should use python3. But then I get the next error. Should install rich. when Installing rich an error with "setuptools". Is there an easy way to install all needed modules? Running Ubuntu:
- Python 3.7.7
- argparse
- requests
- urllib
- random
- uuid
- json
- shutil
- rich
Hi!
You can install all dependencies by running pip install -r requirements.txt
or pip3 install -r requirements.txt
.
But your error indicates that there is no huami_token.py
file. Are you sure that you run python
in the directory, where exist huami_token.py
?
Also please post here the whole error message while running python3
.
Hi, thanks for your reply. I could install all necessary things. I think there is a problem with the module paths:
d@d:~/Schreibtisch/huami-token-master$ pip3 install -r requirements.txt Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (2.22.0) Requirement already satisfied: rich in /usr/local/lib/python3.8/dist-packages/rich-0.0.0-py3.8.egg (from -r requirements.txt (line 2)) (0.0.0) d@d:~/Schreibtisch/huami-token-master$ python3 huami_token.py --method xiaomi --bt_keys Traceback (most recent call last): File "huami_token.py", line 12, in <module> from rich.console import Console ModuleNotFoundError: No module named 'rich'
Any idea how to fix?
Try this: pip3 install rich --upgrade
Hi,
I had several problems with the paths. Meanwhile I uninstalled python and everything belong to it. After reinstalling the problem was solved and I get the Auth-Key. Many thanks for your script and help!