Just noticed this change in the latest nightly build (3.8.20170207.2221). My script wants to plot multiple spectra from a workspace.
w=mtd[“workspacename”] # this workspace has 5 spectra or more
Plot appears with several spectra
TypeError: Incorrect type passed as index argument “xrange(5)”
at line 2 in ‘New script’
caused by line 249 in ‘C:\MantidInstall\bin\pymantidplot_init_.py’
caused by line 1156 in ‘C:\MantidInstall\bin\pymantidplot_init_.py’
Steps to reproduce the behavior
Note if I use list(range(5)) or tuple(range(5)) then it works as intended. Something is being picky about the exact types of list objects.
Thanks for this, it appears in some of our early preparations to move to python 3, one of our changes that should not have leaked out has done and affected backward compatibility. Sorry about this, we will fix it before the release on Friday.
Is there a timetable somewhere for the move to Python 3, from the point of view of users and scientists? We need a suitable opportunity to check and modify our existing scripts, test them with Python 3 inside Mantid, upload the modified versions to the Script Repository and tell the users to download the updates, before they upgrade their Mantid installation to one where Python 3 is the default.
An option somewhere in the Preferences to choose Python 2 or 3 (followed by restarting Mantid) might be appropriate…