datalad / datalad-crawler

DataLad extension for tracking web resources as datasets
http://datalad.org
Other
5 stars 16 forks source link

Running datalad crawl import module error #14

Open um4r12 opened 6 years ago

um4r12 commented 6 years ago
datalad) lorisadmin@mkhan-dev:~/testDataCrawler$ datalad crawl
[INFO   ] Loading pipeline specification from ./.datalad/crawl/crawl.cfg 
[INFO   ] Creating a pipeline to crawl data files from https://mkhan-dev.loris.ca/api/v0.0.3-dev/projects/loris/images/?since=2016-08-09 
[INFO   ] Running pipeline [[<datalad_crawler.nodes.crawl_url.crawl_url object at 0x7fdfab665358>, <datalad_crawler.pipelines.loris.LorisAPIExtractor object at 0x7fdfab665240>, <datalad_crawler.nodes.annex.Annexificator object at 0x7fdfac580160>], <function Annexificator.finalize.<locals>._finalize at 0x7fdfaf8f3950>, <function LorisAPIExtractor.finalize.<locals>._finalize at 0x7fdfab6638c8>] 
[INFO   ] Fetching 'https://mkhan-dev.loris.ca/api/v0.0.3-dev/projects/loris/images/?since=2016-08-09' 
[INFO   ] http session: Authenticating into session for https://mkhan-dev.loris.ca/api/v0.0.3-dev/projects/loris/images/?since=2016-08-09 
Error initializing plugin EntryPoint('Gnome', 'keyrings.alt.Gnome', None, Distribution('keyrings.alt', '3.1')).
Traceback (most recent call last):
  File "/home/lorisadmin/env/datalad/lib/python3.5/site-packages/keyring/backend.py", line 154, in _load_plugins
    init_func = ep.load()
  File "/home/lorisadmin/env/datalad/lib/python3.5/site-packages/entrypoints.py", line 77, in load
    mod = import_module(self.module_name)
  File "/home/lorisadmin/env/datalad/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/keyrings/alt/Gnome.py", line 11, in <module>
    from keyring.py27compat import unicode_str
ImportError: cannot import name 'unicode_str'
Please enter password for encrypted keyring: 
Authentication to access https://mkhan-dev.loris.ca/api/v0.0.3-dev/projects/loris/images/?since=2016-08-09 has failed
Do you want to enter other credentials in case they were updated? (choices: yes, no): yes

You need to authenticate with 'loris-demo' credentials. https://mkhan-dev.loris.ca/api/v0.0.3-dev/login provides information on how to gain access
user: admin

password: 
password (repeat): 
[ERROR  ] Password not found [file.py:delete_password:138] (PasswordDeleteError) 

This problem occurred when I was trying to test the PR #13. I manually tried to install the module by pip install keyrings.alt and I was still being asked the encrypted keyring. Any ideas?

yarikoptic-gitmate commented 6 years ago

GitMate.io thinks possibly related issues are https://github.com/datalad/datalad-crawler/issues/1 (Import docs from datalad-core), https://github.com/datalad/datalad-crawler/issues/12 (Running crawl-init in a non-dataset brings confusing and irrlevant error message), and https://github.com/datalad/datalad-crawler/issues/3 (Confusing crawl-init error).

yarikoptic commented 6 years ago

eh, sorry about that ... so it feels like some compatibility issue between keyrings.alt and keyrings... could you first make sure both are upgraded? (pip install --upgrade keyring keyrings.alt). Looking at keyring code it should just skip the backend failing to initialize. Do you know if you used initially Gnome for your credentials? ( are you in Gnome? if you start "Passwords and Keys" and filter for "datalad" do you see your credentials?)

yarikoptic commented 6 years ago

@um4r12 did upgrade help?

paiva commented 5 years ago

@yarikoptic I am having the same issue right now, upgrade didn't help.

yarikoptic commented 5 years ago

It should have I believe, what do you see for such a command?

$> datalad wtf | grep keyring
  - keyring: 10.6.0
  - keyrings.alt: 3.0
paiva commented 5 years ago

Here is the output:

  - keyring: 17.0.0
  - keyrings.alt: 3.1
paiva commented 5 years ago

Downgrading to those versions still returns the same error:

password:
password (repeat):
[ERROR  ] Password not found [file_base.py:delete_password:195] (PasswordDeleteError)