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
{{ message }}
Repository navigation
clr: AttributeError: 'module' object has no attribute 'AddReference' #76586
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-12-21.22:43:08.904>created_at=<Date2017-12-21.21:58:48.709>labels= []
title="clr: AttributeError: 'module' object has no attribute 'AddReference'"updated_at=<Date2017-12-22.04:58:47.157>user='https://bugs.python.org/Rany'
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 <module>
clr.AddReference("UnityEngine")
AttributeError: 'module' object has no attribute 'AddReference'
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.
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.
Activity
Rany commentedon Dec 21, 2017
Am trying to use clr.AddReference and clr.AddReferenceToFile to import an assembly, but python(2.7) keeps making this error:
Can anyone tell me how to fix this.
bitdancer commentedon Dec 21, 2017
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.
Rany commentedon Dec 21, 2017
Could you provide me a link to contact the clr community please?
terryjreedy commentedon Dec 22, 2017
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.