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

Python3 compatibility #1

Open
olgabot opened this issue Jul 25, 2016 · 0 comments
Open

Python3 compatibility #1

olgabot opened this issue Jul 25, 2016 · 0 comments

Comments

@olgabot
Copy link
Collaborator

olgabot commented Jul 25, 2016

Using qtools as-is with Python3 results in a string/bytes error.

image

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-013388eb4186> in <module>()
      1 import qtools
      2 
----> 3 qtools.Submitter([command], 'macaulay2016_featurecounts', ppn=threads, walltime='24:00:00', queue='home-scrm')

/home/obotvinnik/workspace-git/qtools/qtools/submitter.py in __init__(self, commands, job_name, queue_type, sh, array, nodes, ppn, walltime, queue, account, out, err, max_running, submit, chunksize)
    125 
    126         if self.chunksize is None:
--> 127             self.job()
    128         else:
    129             chunks = len(self.commands) / self.chunksize

/home/obotvinnik/workspace-git/qtools/qtools/submitter.py in job(self)
    257 
    258         elif self.queue_type == 'PBS':
--> 259             self._write_pbs(sh_file)
    260 
    261         if self.array:

/home/obotvinnik/workspace-git/qtools/qtools/submitter.py in _write_pbs(self, sh_file)
    307         self._write_additional_resources(sh_file)
    308 
--> 309         if self.array:
    310             if self.max_running is not None:
    311                 sh_file.write("%s -t 1-%d%%%d\n" % (

/home/obotvinnik/workspace-git/qtools/qtools/submitter.py in array(self)
    152             # self._array is the user-supplied whether or not to use the array
    153             return self._array
--> 154         elif ("oolite" in HOSTNAME) or ("compute" in HOSTNAME):
    155             return True
    156         elif 'tscc' in HOSTNAME:

TypeError: a bytes-like object is required, not 'str'
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

1 participant