Issue 32405: clr: AttributeError: 'module' object has no attribute 'AddReference' (original) (raw)

Created on 2017-12-21 21:58 by Rany, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg308909 - (view) Author: Ranya (Rany) Date: 2017-12-21 21:58
Am trying to use clr.AddReference and clr.AddReferenceToFile to import an assembly, but python(2.7) keeps making this error: Traceback (most recent call last): File "<pyshell#5>", line 1, in clr.AddReference("UnityEngine") AttributeError: 'module' object has no attribute 'AddReference' Can anyone tell me how to fix this.
msg308912 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-12-21 22:43
Whatever clr is, it doesn't look like it is part of the Python standard library. Please contact the clr community for support on this package, or post to the python-list mailing list.
msg308913 - (view) Author: Ranya (Rany) Date: 2017-12-21 22:55
Could you provide me a link to contact the clr community please?
msg308921 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-12-22 04:58
I am 99.99% sure that this is not an IDLE issue. IDLE submits your code to Python to be exec-ed. The exception comes from Python. You should get the same exception (though with a different fake file name) if you ran the same code directly with Python, without IDLE running.
History
Date User Action Args
2022-04-11 14:58:56 admin set github: 76586
2017-12-22 04:58:47 terry.reedy set assignee: terry.reedy -> messages: + components: - IDLE
2017-12-21 22:55:32 Rany set messages: +
2017-12-21 22:43:08 r.david.murray set status: open -> closednosy: + r.david.murraymessages: + resolution: third partystage: resolved
2017-12-21 21:58:48 Rany create