IronLanguages / IronLanguages/ironpython3
IronPython.Runtime.Exceptions.ImportException: 'No module named 'xml.etree.ElementTree''
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 316
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 1
Description
Hi,
I am trying to run python script from C# (.net Framework 4.7 Class Library Project) . I am using Visual studio 2022.
I have added IronPython 3.4.1 as reference to my project, IronPython.StdLib 3.4.1 also added.
When there are no import statements inside the script it is running fine, when there is an import statement in my script file its throwing an "No Module Found error" even though the module is found under the lib folder.
This error is not specific to a module its giving me error for all the basic modules like Math module also.
I added the Searchpaths as well mapping to the lib folder, but still getting the error. Can you tell me what needs to be changed here?
Let me know if you require more details......
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the import failure in the .NET Framework 4.7 class library with IronPython 3.4.1, using the script imports and SearchPaths mapped to the lib folder. Inspect how the embedding setup locates IronPython.StdLib for xml.etree.ElementTree and math. Done means standard-library imports work from the hosted script.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, python
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100