PySlurm / pyslurm

Python Interface to Slurm
https://pyslurm.github.io
GNU General Public License v2.0
467 stars 116 forks source link

ValueError: invalid literal for int() with base 10: 'milton.m' #302

Closed multimeric closed 1 year ago

multimeric commented 1 year ago

Details

Slurm Version: 23.02.1 Python Version: 3.9.5 Cython Version: ? PySlurm Branch: v23.2.1 tag, aka https://github.com/PySlurm/pyslurm/commit/538bf424c0a008175338115c974c74e31af10296 Linux Distribution: CentOS 7

Issue

The docs describe the users filter field as "Search for Jobs with these user names. You can both specify the users as string or by their UID". However specifying via username doesn't seem to work. See example below:

filter = JobSearchFilter(users=["milton.m"])
Jobs.load(filter)

Gives me:

in pyslurm.db.job.Jobs.load:242in pyslurm.db.job.JobSearchFilter._create:151
in pyslurm.db.job.JobSearchFilter._parse_users:107
ValueError: invalid literal for int() with base 10: 'milton.m'
tazend commented 1 year ago

Hi,

thanks for spotting it, should be fixed now when using the main branch or 23.2.x (which I recommend for now, since it also contains a fix for an issue where no results are returned in certain conditions when searching for jobs older than 1 day)