Seeed-Studio / ardupy-aip

ArduPy Integrated Platform is a utility to develop ArduPy and interact witch ArduPy board. It enables users to quickly get started with ardupy.
MIT License
12 stars 7 forks source link

aip list error #12

Closed alej0varas closed 3 weeks ago

alej0varas commented 3 years ago

When I execute aip list I get:

ERROR: Exception:
Traceback (most recent call last):
  File "../lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 180, in _main
    status = self.run(options, args)
  File "../lib/python3.9/site-packages/aip/list.py", line 66, in run
    for library in os.listdir(moduledir):
FileNotFoundError: [Errno 2] No such file or directory: '/home/<user>/.config/aip/modules

I'm using: Python 3.9.5 aip (0.9.1)

alej0varas commented 3 years ago

And I think this error is related

aip install https://github.com/Seeed-Studio/Seeed_Arduino_rpcWiFi
Downloading library......
Downloading https://github.com//Seeed-Studio/Seeed_Arduino_rpcWiFi/archive/master.zip
   | 181 kB 197 kB/s
ERROR: [Errno 2] No such file or directory: '/home/<user>/.config/aip/modules/Seeed_Arduino_rpcWiFi/library.json'
ERROR: Bad dependency format, please check library.json

I looked at the code and didn't find a place where ~/.config/aip/ is created.

alej0varas commented 3 years ago

Found that ~/.local/aip exist the file that doesn't exist is library.json inside the library zip.

I started to dig in the code and tried to fix the issue using the library.properties file that is used for the Arduino Library but I stopped because if a dependency exist I need an index to look for it by name. Looking on github repos in the library.properties none of them use dependencies and only one has a library.json. I could contribute to this in any case just let me know. I can think of to options, remove the dependencies installation functionality or have an index to lookup dependencies by name so the library.propertiies file can be used in the same way Arduino use it. The index could be a repo with a single file with a map of libraries names and urls.

jdevoo commented 3 years ago

I have this issue with https://github.com/Seeed-Studio/Seeed_Arduino_MultiGas at the moment