Bug #24048

Python 3 Incompatible scripts

Added by Iker de Icaza Astiz 7 days ago. Updated 1 day ago.

Start date:
Due date:
% Done:


Estimated time:


Running sbndcode v08_42_00 e19:prof on SL7 I came across this traceback exception when trying to use

Traceback (most recent call last):
  File "/cvmfs/", line 32, in <module>
    import project_utilities
  File "/cvmfs/", line 32, in <module>
    import larbatch_posix
  File "/cvmfs/", line 134, in <module>
    import larbatch_utilities
  File "/cvmfs/", line 1214, in <module>
    from experiment_utilities import *
  File "/sbnd/data/users/icaza/work/sbndcode/flashmatch/localProducts_larsoft_v08_42_00_e19_prof/sbndutil/v08_42_00/python/", line 53
    raise RuntimeError, 'Missing or invalid metadata for file %s.' % filename
SyntaxError: invalid syntax

I have pushed branch feature/icaza_Py2ToPy3 which has changes to python/ and python/ to enable them to run with Python 3. I used the python script 2to3-3.7 to make these changes.

Unfortunately I still haven't managed to get it to run all the way, now is getting stuck on Look at:

I'll try and test if the changes on the branch I pushed work ok with Python2 and SL6 sometime next week.

I'll follow up with larbatch too.


#1 Updated by Iker de Icaza Astiz 2 days ago

  • % Done changed from 0 to 100
  • Status changed from New to Feedback

I confirm that my changes work with:

sbndcode          v08_43_00       -f Linux64bit+3.10-2.17 -q e19:prof

running on SL7


sbndcode          v08_43_00       -f Linux64bit+2.6-2.12  -q e19:prof:py2

running SL6.

So yeah, they're backwards compatible and working with Python3.

I've also formatted the script to use 4 spaces indentation and follow pep8 guidelines.

#2 Updated by Iker de Icaza Astiz 1 day ago

  • Status changed from Feedback to Closed

I've merged and to push to develop.

Also the issue with upstream has been solved on larbatch v01_52_02

Also available in: Atom PDF