ITC-CRIB / jupyter-fairly

A JupyterLab extension for seamless integration of Jupyter-based research environments and research data repositories.
https://fairly.readthedocs.io
MIT License
8 stars 3 forks source link

Unexpected error when installing extension #57

Closed manuGil closed 1 year ago

manuGil commented 1 year ago

Is this something related to fairly? This error first appeared when trying to update the fairly package in the extension. That is a re-installation was called. I started the installation process in a new venv and now the error appears with attempting to install the extension in develop mode with jupyter labextension develop --overwrite .

ModuleNotFoundError: There is no labextension at .. Errors encountered: 
[TypeError("the 'package' argument is required to perform a relative import for '.'"), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), 
AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), 
AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), 
AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), 
AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL'), AttributeError('Invalid client_id orcid:APP-IEL')]
See the log file for details:  /tmp/jupyterlab-debug-k2ryluqd.log
manuGil commented 1 year ago

It could be that the problem is with my venv, but I found it strange that the error message mentioned orcid

manuGil commented 1 year ago

This was caused by a wrongly formatted config.json in ~/.fairly, and the check in https://github.com/ITC-CRIB/fairly/blob/4c202da78446118ecfbce05c27a35e9fc5c8db69/src/fairly/__init__.py#L161

Solved after adding the fairly object to the config.json:

{
    "fairly": {
        "orcid_client_id":"APP-IELS3LR4OCLHLELC",
        "orcid_clien_secret": "",
        "orcid_token": ""
    }
.....
}