cnumr / ecoindex_python_fullstack

Refactoring of ecoindex in one monorepo using polylith pattern
Other
11 stars 3 forks source link

[Bug]: Input file on cli not working on macOS #83

Open jeanremy opened 2 months ago

jeanremy commented 2 months ago

What happened?

When trying to use a csv file as input, I get the following error:

~/Desktop/test
❯ ls
-rw-r--r--@  1 user  staff  -  25 20 jui 15:22 input.csv

~/Desktop/test
❯ ecoindex-cli analyze --urls-file input.csv
1 validation error for get_urls_from_file
urls_file
  Path does not point to a file [type=path_not_file, input_value='input.csv', input_type=str]

I'm on Sonoma 14.3.1, using the latest version of the cli (2.27.1 I think). I have tried different paths, like ~/Desktop/test/input.csv, ./input.csv or /Users/user/Desktop/test/input.csv Am I doing something wrong ?

Thanks !

Project

Ecoindex CLI

What OS do you use?

Mac

urls

No response

Relevant log output

No response

Code of Conduct

vvatelot commented 2 months ago

Hello @jeanremy, thanks for your issue ! It is not a problem related to what you do, it is the documentation that is not up to date...

If you installed ecoindex-cli following the documentation using docker, the docker container will only have access to the /tmp/ecoindex-cli folder of your host, so I guess that if you move your file to /tmp/ecoindex-cli and run

ecoindex-cli analyze --urls-file /tmp/ecoindex-cli/input.csv

it should work...?

jeanremy commented 2 months ago

Thank you for your answer @vvatelot, it works !

Should I make a PR to add it to the documentation ?

vvatelot commented 2 months ago

Hello @jeanremy if you can do it, I would really appreciate it! 🙂

jeanremy commented 2 months ago

Hi @vvatelot,

Done just here : https://github.com/cnumr/ecoindex_python_fullstack/pull/84

I hope it's ok for you !

github-actions[bot] commented 3 days ago

This issue has been marked as inactive because it hasn't been updated for 30 days. If it's not updated within 7 days, it will be automatically closed. To prevent it from being closed, you can add the keep open label.