← Winnitude! Search  ·  Reader Mode (1744 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 8 LINKS

System.ArgumentException: Illegal characters in path · Issue #2376 · pythonnet/pythonnet

Repository navigation

System.ArgumentException: Illegal characters in path  #2376


New issue

New issue

Closed
#2383
Closed
System.ArgumentException: Illegal characters in path #2376 #2383

Description

@manju1847's profile manju1847 opened on May 7, 2024

Environment

  • Pythonnet version: 3.0.3
  • Python version: 3.10.11
  • Operating System: Windows 10
  • .NET Runtime: 4.5

Details

  • Trying to load DLL using AddReference.

import clr
clr.AddReference("C:\MyProject\TestFolder_Dependencies\MyDLLProject\Test.TA.MyVersion.Test.dll")

System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.Combine(String path1, String path2)
at Python.Runtime.AssemblyManager.d__15.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at Python.Runtime.AssemblyManager.LoadAssemblyPath(String name)
at Python.Runtime.CLRModule.AddReference(String name)

DLL is not a new implementation. Same DLL and same path was working fine with python 3.7 and PythonNET 2.4.0. This issue started happening when we upgraded python and Pythonnet versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions