Describe the bug
When i run this code it doesnt get jtop and shows error. i have already installed jtop
from jtop import jtop
import json, datetime
if name == "main":
with jtop() as jetson:
# jetson.stats provides our system measurements as type dict.
tmp = jetson.stats
# time and uptime are proved as time objects. These needed to be converted before passing as a JSON string,
tmp["time"] = str(tmp["time"].strftime('%m/%d/%Y'))
tmp["uptime"] = str(tmp["uptime"])
# We then convert our dict -> Json string
influx_json= {"jetson": tmp}
print(json.dumps(influx_json), flush=True)
To Reproduce
python3 jtop.py
Traceback (most recent call last):
File "jtop.py", line 8, in
from jtop import jtop
File "/home/anamika/Downloads/yolo_5/jtop.py", line 8, in
from jtop import jtop
ImportError: cannot import name 'jtop'
anamika@anamika-desktop:~/Downloads/yolo_5$ python3 --version
Python 3.6.9
Describe the bug
When i run this code it doesnt get jtop and shows error. i have already installed jtop
from jtop import jtop
import json, datetime
if name == "main":
To Reproduce
python3 jtop.py
Traceback (most recent call last):
File "jtop.py", line 8, in
from jtop import jtop
File "/home/anamika/Downloads/yolo_5/jtop.py", line 8, in
from jtop import jtop
ImportError: cannot import name 'jtop'
anamika@anamika-desktop:~/Downloads/yolo_5$ python3 --version
Python 3.6.9