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

TypeError: 'NoneType' object has no attribute '__getitem__ #928

Open
kellogg76 opened this issue Apr 11, 2019 · 5 comments
Open

TypeError: 'NoneType' object has no attribute '__getitem__ #928

kellogg76 opened this issue Apr 11, 2019 · 5 comments

Comments

@kellogg76
Copy link

I'm having an issue running gemini commands that worked just a few weeks ago.

running :-
gemini load -v ~/FEVR/hg19.snpEff.vcf -t snpEff --cores 8 ~/FEVR/hg19.db

gives the following error

Traceback (most recent call last):
  File "/usr/local/bin/gemini", line 7, in <module>
    gemini_main.main()
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_main.py", line 1249, in main
    args.func(parser, args)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_main.py", line 204, in load_fn
    gemini_load.load(parser, args)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_load.py", line 23, in load
    annos = annotations.get_anno_files(args)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/annotations.py", line 23, in get_anno_files
    anno_dirname = config["annotation_dir"]
TypeError: 'NoneType' object has no attribute '__getitem__'

If I try to run gemini update, I get :-

Collecting package metadata: failed

NotWritableError: The current user does not have write permissions to a required path.
  path: /usr/local/share/gemini/anaconda/pkgs/cache/4ea078d6.json
  uid: 1003
  gid: 1004

If you feel that permissions on this path are set incorrectly, you can manually
change them by executing

  $ sudo chown 1003:1004 /usr/local/share/gemini/anaconda/pkgs/cache/4ea078d6.json

In general, it's not advisable to use 'sudo conda'.


Traceback (most recent call last):
  File "/usr/local/bin/gemini", line 7, in <module>
    gemini_main.main()
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_main.py", line 1249, in main
    args.func(parser, args)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_main.py", line 1085, in update_fn
    gemini_update.release(parser, args)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_update.py", line 23, in release
    "gemini", "cyvcf2", "pip"])
  File "/usr/local/share/gemini/anaconda/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/share/gemini/anaconda/bin/conda', 'install', '-y', '-c', 'conda-forge', '-c', 'bioconda', 'gemini', 'cyvcf2', 'pip']' returned non-zero exit status 1

gemini --v show's i'm running 0.30.1

Any help is appreciated.

@brentp
Copy link
Collaborator

brentp commented Apr 12, 2019

the permissions on your install are messed up. I would re-install from scratch.
Or maybe you can try sudo chown -R $USER:$USER //usr/local/share/gemini/

@kellogg76
Copy link
Author

kellogg76 commented Apr 15, 2019

the permissions on your install are messed up. I would re-install from scratch.
Or maybe you can try sudo chown -R $USER:$USER //usr/local/share/gemini/

Thanks, but reinstalling from scratch with
python gemini_install.py /usr/local /usr/local/share/gemini

Gives another error.

/usr/local/share/gemini/anaconda/bin/gemini --annotation-dir /usr/local/share/gemini/gemini_data update --dataonly --tooldir /usr/local
Upgrading associated tools...
Traceback (most recent call last):
  File "/usr/local/share/gemini/anaconda/bin/gemini", line 7, in <module>
    gemini_main.main()
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_main.py", line 1249, in main
    args.func(parser, args)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_main.py", line 1085, in update_fn
    gemini_update.release(parser, args)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/gemini_update.py", line 34, in release
    config = gemini.config.read_gemini_config(args=args, allow_missing=True)
  File "/usr/local/share/gemini/anaconda/lib/python2.7/site-packages/gemini/config.py", line 65, in read_gemini_config
    config["annotation_dir"] = args.annotation_dir
TypeError: 'NoneType' object does not support item assignment
Traceback (most recent call last):
  File "gemini_install.py", line 191, in <module>
    main(parser.parse_args())
  File "gemini_install.py", line 84, in main
    install_rest(gemini, args)
  File "gemini_install.py", line 149, in install_rest
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/share/gemini/anaconda/bin/gemini', '--annotation-dir', '/usr/local/share/gemini/gemini_data', 'update', '--dataonly', '--tooldir', '/usr/local']' returned non-zero exit status 1

I've restinstalled Anaconda but didn't make any difference.
Do you have any other suggestions on what I can try?

@brentp
Copy link
Collaborator

brentp commented Apr 15, 2019

It looks like that's the same error, you don't have permissions in /usr/local/share

@kellogg76
Copy link
Author

It looks like that's the same error, you don't have permissions in /usr/local/share

I wondered that but my permissions for /usr/local/share are rwxrwxrwx, and I get the same error no matter where I try installing even though my account is Admin.

@YichaoOU
Copy link

same problem here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants