Comments (7)
Hi,
I tried using pyslurm with python 3 but get e.g.:
->>> print(a.find('job_state', 'Running'))
Traceback (most recent call last):
File "", line 1, in
File "pyslurm/pyslurm.pyx", line 1723, in pyslurm.pyslurm.job.find (pyslurm/pyslurm.c:22792)
TypeError: expected bytes, str found
I guess this is due to unicode strings not fully supported. If you'd give me a hint of what to change we'd work on this.
from pyslurm.
Thanks for that report. I'm currently working on testing 15.08.0-preX so once this working branch is committed (soon) I will take a look at adding proper Python3 support to it as well, I think someone raised a ticket with some suggestions earlier so I will have a search.
from pyslurm.
Having had a play it looks like I will need to commit current 15.08.0-preX branch (Python2.x) and start making changes for Python3 after that. Which Slurm version are you using ?
from pyslurm.
I'm using 14.11.5. As I said, we're happy to help porting.
from pyslurm.
I am working on getting this working with python3 now, I fixed @rfehren problem by changing
def find(self, char *name='', val=''):
to
def find(self, name='', val='')
This works as expected in both python2 and python3, plus I think it makes more sense than making the round trip to C, which seems unnecessary and potentially costly in this instance.
I could be wrong though, I am not a C programmer (anymore) and I rarely use cython. Thoughts?
from pyslurm.
I just made a pull request for the 14.11.5 branch that applies this fix
from pyslurm.
PR #87 added python3 compatibility to PySlurm. If there are any lingering encoding issues in Python3, please raise a new, specific issue for it. Thanks.
from pyslurm.
Related Issues (20)
- pyslurm throw KeyError 5039 when statistics().get() called HOT 2
- symbol lookup error: undefined symbol: data_init HOT 7
- Installation fails for v22.5.x HOT 2
- Submittion of a batch job will be failed when argument "work_dir" contains a "_" HOT 1
- Unclear that `Jobs.load()` returns a dictionary. HOT 2
- Missing `Job` fields compared to the docs HOT 2
- slurmdbd: Implement Association API
- ValueError: invalid literal for int() with base 10: 'milton.m' HOT 1
- Copy/Paste error in Job class memory property HOT 1
- Cannot seem to get allocated gres info from Node HOT 4
- Node in Nodes collection do not report a MIXED state, only IDLE or ALLOCATED HOT 5
- A job is found with JobFilter if it is running on start_time HOT 6
- question: install on cluster without slurm-devel package and without root access HOT 2
- job mem returns as "None" HOT 3
- error: ‘KILL_JOB_ARRAY’ undeclared HOT 1
- Slurm 23.11 support HOT 3
- pyslurm is installation failed HOT 2
- Particular value of gres is causing cstr to crash HOT 1
- [guidance request] 'gres' : 'gpu' does not have the same behavior as when using bash HOT 2
- Problem in setup.py get_version() - packaging.version object is missing .major and .minor attributes in earlier module versions under Python 3.6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyslurm.