"Unknown workspace" error in 2016.5


#1

I have set my project to a new location which contains all the workspace.mel file and the relevant sub folders

However when I run the following command, I getting an error

from maya import cmds
print cmds.workspace('images', q=True, fileRuleEntry=True)
# Error: Unknown workspace.
# Traceback (most recent call last):
#   File "<maya console>", line 2, in <module>
# RuntimeError: Unknown workspace. #

In 2016.0 this command has no issues

from maya import cmds
print cmds.workspace('images', q=True, fileRuleEntry=True)

Anyone else encountered this problem?


#2

I have. The latter syntax seems to be unique to 2016.0. for everything else, you’ll need this format:

print cmds.workspace(fileRuleEntry=‘images’)

Hope this helps.


#3

Thank you for that. Solved the issue