Clr.AddReference('example_file') – Assembly konnte nicht gefunden werdenPython

Python-Programme
Anonymous
 Clr.AddReference('example_file') – Assembly konnte nicht gefunden werden

Post by Anonymous »

Ich versuche, mithilfe der AddReference('example_file')-Methode aus dem Clr-Modul einen Verweis auf „example_file.dll“ hinzuzufügen:

Code: Select all

>>>import clr
>>>clr.AddReference('example_file')
und als Ergebnis erhalte ich:

Code: Select all

Traceback (most recent call last):
File "", line 1, in 
System.IO.FileNotFoundException: Unable to find assembly 'example_file'.

at Python.Runtime.CLRModule.AddReference(String name)
Alle Dateien befinden sich im aktuellen Arbeitsverzeichnis und sys.path sieht folgendermaßen aus:

Code: Select all

>>> sys.path
['', 'C:\\Python27\\lib\\site-packages\\pip-1.2.1-py2.7.egg', 'C:\\Python27', 'C
:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27\\lib\\
site-packages', 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\']
Zusätzlich aufgrund von:

Code: Select all

>>>clr.FindAssembly('example_file')
Ich bekomme

Code: Select all

u'example_file.dll
Das Problem trat von Tag zu Tag auf. Ich bin verwirrt, weil es vorher gut funktioniert hat – ich weiß nicht, was sich darauf auswirken könnte.
Ich arbeite mit Windows 7 x64, Python 2.73 und .Net Framework 4

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post