ImportError: No module named ordered_dict

Has anyone come across this error ImportError: No module named ordered_dict in a Jython script task? I am having this issue on XLR 9.8.0/9.7.6 with Ansible tower plugin when attempting to run a task , i.e. Launch Job Template, as well as, when doing a connection test for “XL Release: Server” under “Shared Configuration” .

Any suggestions, on how this issue can be worked around is much appreciated.

Hi Community,

An update on this issue, after further investigation, it appears this error can simply be reproduced, if we try to “import requests” in a jython script task -
Exception during execution:
javax.script.ScriptException: ImportError: No module named ordered_dict in

any ideas how this can be worked around?

Hi all,
I have worked out what the issue was in this case, it is incompatibility between urllib3 and requests module. In my environment, I have both xlr-ansible-tower-plugin and xlr-xlrelease-plugin installed.

1.15.1 <<< version of urllib3 in XLR v9.7.2 (working environment with both plugins installed)
1.25.9 <<< version of urllib3 in XLR v9.8.0/9.7.6 (issue occurs in this environment with both plugins installed)

2.19.1 <<< version of requests module shipped with xlr-xlrelease-plugin, according to documentations that are around urllib3 is only supported up to v 1.23.x for requests module 2.19.1

In my case, I have replaced the requests module within xlr-xlrelease-plugin-2.3.6.jar file with requests module v 2.24.0 , and that has resolved the issue across the board with ImportError: No module named ordered_dict. Further to that, if I do not install xlr-xlrelease-plugin , then I do not have this issue at all anyway and ansible-tower plugin also works fine in that case. Also, I have tested removing requests module from xlr-xlrelease-plugin-2.3.7.jar file and that also resolves the issue.

Good to know, thanks for the post.

In general, make sure your libraries are Python 2.7 compatible. We are using the Jython runtime that is unfortunately stuck on Python 2.7.

Furthermore, what do you use the xlr-xlrelease-plugin for? There may be better alternatives by now.

Kind regards,

Hes Siemelink
Product Manager

Hi Hes,
I use xlr-xlrelease-plugin for manipulating Tags.


Do you have a description or snippet of what you need to do. You may be able to use the public API from the script task in other to achieve what you need.

Kind regards,


Thanks @Hes , it is get/add/delete tag type of operation , which is what is use xlr-xlrelease plugin for. I also have some script tasks where I utilize release package and its tags and setTags attribute/methods.

best regards

Thanks Ruben

The ‘tag’ tasks do not use the requests library – they just work on the current release using the public API directly and do not call to another server. So you should be safe in any case.

Kind regards,