Skip to content

clr: AttributeError: 'module' object has no attribute 'AddReference' #76586

Closed

Description

@Rany
mannequin
BPO 32405
Nosy @terryjreedy, @bitdancer

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 = None
closed_at = <Date 2017-12-21.22:43:08.904>
created_at = <Date 2017-12-21.21:58:48.709>
labels = []
title = "clr: AttributeError: 'module' object has no attribute 'AddReference'"
updated_at = <Date 2017-12-22.04:58:47.157>
user = 'https://bugs.python.org/Rany'

bugs.python.org fields:

activity = <Date 2017-12-22.04:58:47.157>
actor = 'terry.reedy'
assignee = 'none'
closed = True
closed_date = <Date 2017-12-21.22:43:08.904>
closer = 'r.david.murray'
components = []
creation = <Date 2017-12-21.21:58:48.709>
creator = 'Rany'
dependencies = []
files = []
hgrepos = []
issue_num = 32405
keywords = []
message_count = 4.0
messages = ['308909', '308912', '308913', '308921']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'r.david.murray', 'Rany']
pr_nums = []
priority = 'normal'
resolution = 'third party'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue32405'
versions = ['Python 2.7']

Activity

  1. Rany commented on Dec 21, 2017

    Ranymannequin
    MannequinAuthor

    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'

    Can anyone tell me how to fix this.

  2. bitdancer commented on Dec 21, 2017

    @bitdancer
    Member

    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.

  3. Rany commented on Dec 21, 2017

    Ranymannequin
    MannequinAuthor

    Could you provide me a link to contact the clr community please?

  4. terryjreedy commented on Dec 22, 2017

    @terryjreedy
    Member

    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.

  5. removed their assignment
    on Dec 22, 2017
  6. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions