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

Passing NoneType to string formatting operand #147

Closed
shepp-hub opened this issue Dec 23, 2021 · 2 comments
Closed

Passing NoneType to string formatting operand #147

shepp-hub opened this issue Dec 23, 2021 · 2 comments

Comments

@shepp-hub
Copy link

  • spladder version: 2.4.4
  • Python version: 3.7
  • Operating System: CentOS 7

Description

While running spladder build, I had this little warning message pop up and crash.
It's just a tiny issue that could be fixed by either accounting for strand is None, or maybe not printing it at all.
It's a tiny, easy to fix issue, but it might be intimidating for programming-averse users.

What I Did

Traceback (most recent call last):
  File "/groups/nshomron/guyshapira/.local/bin/spladder", line 8, in <module>
    sys.exit(main())
  File "/groups/nshomron/guyshapira/.local/lib/python3.7/site-packages/spladder/spladder.py", line 190, in main
    options.func(options)
  File "/groups/nshomron/guyshapira/.local/lib/python3.7/site-packages/spladder/spladder_build.py", line 83, in spladder
    (genes, options) = init.init_genes_gff3(options)
  File "/groups/nshomron/guyshapira/.local/lib/python3.7/site-packages/spladder/init.py", line 218, in init_genes_gff3
    genes[tags['ID']] = Gene(name=tags['ID'], start=start, stop=stop, chr=sl[0], strand=sl[6], source=sl[1], gene_type=sl[2])
  File "/groups/nshomron/guyshapira/.local/lib/python3.7/site-packages/spladder/classes/gene.py", line 23, in __init__
    warnings.warn('WARNING: strand of gene was provided as %s - automatically set to +') % strand
TypeError: unsupported operand type(s) for %: 'NoneType' and 'str'
akahles added a commit that referenced this issue Jan 5, 2022
@akahles
Copy link
Member

akahles commented Jan 5, 2022

Dear @shepp-hub ,

Thank you very much for reporting. I have fixed the issue in the development branch. The change will be available with the next release.

Best,

Andre

@akahles
Copy link
Member

akahles commented Jan 5, 2022

Closing this, please re-open if still relevant.

@akahles akahles closed this as completed Jan 5, 2022
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