You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was testing another python library in IronPython which calls munch, I found some errors when importing munch in IronPython. Here's what I did:
>>>import munch
Runtime error (ArgumentTypeException): unicode_escape_decode() takes no arguments (1 given)
Traceback:
line 337, in <module>, "C:\Anaconda2\Lib\site-packages\munch\__init__.py"
line 6, in script
line 14, in u, "C:\Anaconda2\Lib\site-packages\munch\python3_compat.py"
I had consulted @dglassman for this issue, and here is his solution:
The conflicts are in python3_compat.py. "The issue is that munch includes a shim for compatibility with Python3, but IronPython doesn't understand it. And since we're working with Python 2.7, we don't need it."
The line 14 of the original python3_compat.py was: return codecs.unicode_escape_decode(string)[0]
Is replaced with: return unicode(string)
After I made this change, the munch library is imported successfully.
This might be a potential issue for IronPython users, if the solution is correct, please make the updates in next release.
The text was updated successfully, but these errors were encountered:
I was testing another python library in IronPython which calls munch, I found some errors when importing munch in IronPython. Here's what I did:
I had consulted @dglassman for this issue, and here is his solution:
The conflicts are in python3_compat.py. "The issue is that munch includes a shim for compatibility with Python3, but IronPython doesn't understand it. And since we're working with Python 2.7, we don't need it."
The line 14 of the original python3_compat.py was:
return codecs.unicode_escape_decode(string)[0]
Is replaced with:
return unicode(string)
After I made this change, the munch library is imported successfully.
This might be a potential issue for IronPython users, if the solution is correct, please make the updates in next release.
The text was updated successfully, but these errors were encountered: