DLR-SC / GitLab-Corpus

Creates a corpus for publicly accessible repositories in a GitLab instance.
Other
2 stars 1 forks source link

config file need to be specified via ./config-file , just config-file does not work #1

Closed StephanJanosch closed 2 years ago

StephanJanosch commented 2 years ago

$ /opt/homebrew//Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/bin/corpus -g config-file -v true extract

Traceback (most recent call last): File "/opt/homebrew//Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/bin/corpus", line 33, in <module> sys.exit(load_entry_point('corpus', 'console_scripts', 'corpus')()) File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1137, in __call__ return self.main(*args, **kwargs) File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1062, in main rv = self.invoke(ctx) File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1665, in invoke super().invoke(ctx) File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 763, in invoke return __callback(*args, **kwargs) File "/opt/homebrew/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/opt/homebrew/lib/python3.9/site-packages/click/core.py", line 763, in invoke return __callback(*args, **kwargs) File "/Users/janosch/dev/rse/GitLab-Corpus/src/corpus.py", line 35, in cli config.gl = gitlab.Gitlab.from_config(source, gl_config) File "/opt/homebrew/lib/python3.9/site-packages/gitlab/client.py", line 232, in from_config config = gitlab.config.GitlabConfigParser( File "/opt/homebrew/lib/python3.9/site-packages/gitlab/config.py", line 75, in __init__ raise GitlabConfigMissingError( gitlab.config.GitlabConfigMissingError: Config file not found. Please create one in one of the following locations: /etc/python-gitlab.cfg, /Users/janosch/.python-gitlab.cfg or specify a config file using the '-c' parameter.

but

$ python3 /opt/homebrew//Cellar/python@3.9/3.9.12_1/Frameworks/Python.framework/Versions/3.9/bin/corpus -g ./config-file -v true extract

works.

schlauch commented 2 years ago

Thanks! I can confirm that issue.