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__' #13

Closed
pezhmansafdari opened this issue Nov 15, 2016 · 9 comments
Closed

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

pezhmansafdari opened this issue Nov 15, 2016 · 9 comments

Comments

@pezhmansafdari
Copy link

Hi,

I am trying to run rapclust but I am getting an error like this:
Traceback (most recent call last):
File "/usr/bin/RapClust", line 89, in
processQuant()
File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/bin/RapClust", line 34, in processQuant
samples = cfg['samples'][c]
TypeError: 'NoneType' object has no attribute 'getitem'
Would you please help me with the posible cause of the problem?

BR,
Pezhman

@k3yavi
Copy link
Member

k3yavi commented Nov 15, 2016

Hi Pezhman,

On the first look of your trace, it looks like yaml file has not been configured correctly.
Can you please check that the input yaml file has been configured according to these requirements.

Let us know how it worked out.

@pezhmansafdari
Copy link
Author

Hi,

I attach my yaml file. I don't see anything wrong with it.

BR,
Pezhman

On Tue, Nov 15, 2016 at 3:42 PM, Avi Srivastava notifications@github.com
wrote:

Hi Pezhman,

On the first looks of your trace, it looks like yaml file has not been
configured correctly.
Can you please check that the input yaml file has been configured
according to these
https://github.com/COMBINE-lab/RapClust#using-rapclust requirements.

Let us know how it worked out.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFlG0rV75_r41su97vPYzan4WEZkk5Tuks5q-bbagaJpZM4KybVx
.

@k3yavi
Copy link
Member

k3yavi commented Nov 15, 2016

I think you forgot to attach.

@pezhmansafdari
Copy link
Author

Hi,

conditions:

  • contorol
  • Infected
    samples:
    control:
    • A019
    • A020
    • A021
    • A022
    • A023
    • A024
    • A025
    • A026
    • A027
    • A028
    • A029
    • A030
    • A031
    • A032
    • A033
    • A034
    • A035
    • A036
      Infected:
    • A001
    • A002
    • A003
    • A004
    • A005
    • A006
    • A007
    • A008
    • A009
    • A010
    • A011
    • A012
    • A013
    • A014
    • A015
    • A016
    • A017
    • A018
      outdir: Plantago_rapclust

BR,
Pezhman

On Tue, Nov 15, 2016 at 4:17 PM, Avi Srivastava notifications@github.com
wrote:

I think you forgot to attach.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFlG0kL7TEnUQ6O6Hb3d2r3A85xYkea4ks5q-b7cgaJpZM4KybVx
.

@k3yavi
Copy link
Member

k3yavi commented Nov 16, 2016

Hi Pezhman,

Please use the below attached yaml file for your analysis.
I hope it'll work for you now.

Let us know how it works out.

rapclust.yaml.zip

@pezhmansafdari
Copy link
Author

Hi Avi,

It is still not working. now I get the following error message:
Traceback (most recent call last):
File "/usr/bin/RapClust", line 89, in
processQuant()
File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in
call
return self.main(_args, *_kwargs)
File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, *_ctx.params)
File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(_args, **kwargs)
File "/usr/bin/RapClust", line 19, in processQuant
cfg = yaml.load(yamCfg)
File "/usr/lib64/python2.7/site-packages/yaml/init.py", line 71, in
load
return loader.get_single_data()
File "/usr/lib64/python2.7/site-packages/yaml/constructor.py", line 37,
in get_single_data
node = self.get_single_node()
File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 36, in
get_single_node
document = self.compose_document()
File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 55, in
compose_document
node = self.compose_node(None, None)
File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in
compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in
compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 84, in
compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 133, in
compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib64/python2.7/site-packages/yaml/composer.py", line 64, in
compose_node
if self.check_event(AliasEvent):
File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 98, in
check_event
self.current_event = self.state()
File "/usr/lib64/python2.7/site-packages/yaml/parser.py", line 449, in
parse_block_mapping_value
if not self.check_token(KeyToken, ValueToken, BlockEndToken):
File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 116, in
check_token
self.fetch_more_tokens()
File "/usr/lib64/python2.7/site-packages/yaml/scanner.py", line 257, in
fetch_more_tokens
% ch.encode('utf-8'), self.get_mark())
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "rapclust.yaml", line 6, column 1

BR,
Pezhman

On Wed, Nov 16, 2016 at 7:06 PM, Avi Srivastava notifications@github.com
wrote:

Hi Pezhman,

Please use the below attached yaml file for your analysis.
I hope it'll work for you now.

Let us know how it works out.

rapclust.yaml.zip
https://github.com/COMBINE-lab/RapClust/files/595298/rapclust.yaml.zip


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFlG0np35IOklRif-NBrTjGlFw1voghbks5q-zgdgaJpZM4KybVx
.

@k3yavi
Copy link
Member

k3yavi commented Nov 17, 2016

looks like yaml doesn't like tabs and want spaces in its files.
I've replaced tabs with spaces and attached the relevant file.
rapclust.yaml.zip

@pezhmansafdari
Copy link
Author

Hi Avi,

We figured the same out yesterday. We used for space instead of tabs and
the config file worked. The clustering results also seems very promising.
Thanks a lot.

Cheers,
Pezhman

On Thu, Nov 17, 2016 at 9:41 PM, Avi Srivastava notifications@github.com
wrote:

looks like yaml doesn't like tabs and wan't spaces in it's files.
I've replaced tabs with spaces and attached the relevant file.
rapclust.yaml.zip
https://github.com/COMBINE-lab/RapClust/files/598269/rapclust.yaml.zip


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFlG0oHXcbWZh-A7GxWlD2B8HX06wbPHks5q_K3tgaJpZM4KybVx
.

@k3yavi
Copy link
Member

k3yavi commented Nov 18, 2016

Glad to hear that!

@k3yavi k3yavi closed this as completed Nov 18, 2016
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

2 participants