Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when parsing python projects #27

Closed
broeder-j opened this issue Sep 15, 2022 · 2 comments
Closed

Error when parsing python projects #27

broeder-j opened this issue Sep 15, 2022 · 2 comments
Assignees
Labels
bug Something isn't working ready Done/implemented, but release still pending

Comments

@broeder-j
Copy link

Hi there. First thanks for your work. So far I could not make it work for any of my python projects with pyproject.toml using poetry as a build system. I always end up with this error below. So I tried if I can do it for codemetapy after a simple pip install of it and it fails in the same way.

I am on linux. Python 3.8.10

$codemetapy codemetapy > codemeta.json
Passed 1 files/sources but specified 0 input types! Automatically guessing types...
Detected input types: []
Traceback (most recent call last):
  File "/work/envs/db/bin/codemetapy", line 8, in <module>
    sys.exit(main())
  File "/work/envs/db/lib/python3.8/site-packages/codemeta/codemeta.py", line 136, in main
    g, res, args, contextgraph = build(**args.__dict__)
  File "/work/envs/db/lib/python3.8/site-packages/codemeta/codemeta.py", line 288, in build
    identifier = os.path.basename(inputsources[0][0]).lower()
IndexError: list index out of range
@broeder-j
Copy link
Author

broeder-j commented Sep 15, 2022

Ok, I made it work by specifying the input type -i python. I leave this open because maybe you would like to stop if no input types are detected instead of running into the later exception. Or you want to improve the type detection.

proycon added a commit that referenced this issue Sep 15, 2022
@proycon
Copy link
Owner

proycon commented Sep 15, 2022

Thanks for the feedback! There was indeed something missing in the type detection. The above commit should fix it.

@proycon proycon self-assigned this Sep 15, 2022
@proycon proycon added help wanted Extra attention is needed ready Done/implemented, but release still pending bug Something isn't working and removed help wanted Extra attention is needed labels Sep 15, 2022
@proycon proycon closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready Done/implemented, but release still pending
Projects
None yet
Development

No branches or pull requests

2 participants