Re: [Python.NET] Issue with beautifulsoup 4

Denis Akhiyarov <[email protected]>
Newsgroups gmane.comp.python.dotnet
Message-ID <CALxxJLROzVHMETkh4GTB2pKEk90b6hHcFf9Qdj5McTfh+P3dvg@mail.gmail.com>
There is pending pull request hopefully addressing this issue:

https://github.com/pythonnet/pythonnet/pull/219


If not, then please open an issue on github or comment on that pull request.



On Friday, May 27, 2016, Daniel Fernandez <[email protected]>
wrote:

> Hey Everyone,
>
> I'm running into an issue importing beautifulsoup 4 only if I import clr
> before importing beautifulsoup. I'm using python 3.5 32-bit version on my
> Windows 7 and Windows 10 box. I'm using beautifulsoup package from Gohlke
> website (beautifulsoup4-4.4.1-py3-none-any.whl)
>
> I simply run
> import clr
> from bs4 import beautifulsoup
>
> then I get this error
>
> Unhandled Exception: System.ArgumentException: Name must not be empty!
>    at Python.Runtime.ModuleObject..ctor(String name)
>    at Python.Runtime.ModuleObject.GetAttribute(String name, Boolean guess)
>    at Python.Runtime.ImportHook.__import__(IntPtr self, IntPtr args,
> IntPtr kw)
>    at Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args,
> IntPtr kw)
>    at Python.Runtime.ImportHook.__import__(IntPtr self, IntPtr args,
> IntPtr kw)
>    at Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args,
> IntPtr kw)
>    at Python.Runtime.ImportHook.__import__(IntPtr self, IntPtr args,
> IntPtr kw)
>
>
> I build the pythonnet debug version I get this call stack
>
> Unhandled Exception: System.ArgumentException: Name must not be empty!
>    at Python.Runtime.ModuleObject..ctor(String name) in
> pythonnet\src\runtime\moduleobject.cs:line 26
>    at Python.Runtime.ModuleObject.GetAttribute(String name, Boolean guess)
> in pythonnet\src\runtime\moduleobject.cs:line 101
>    at Python.Runtime.ImportHook.__import__(IntPtr self, IntPtr args,
> IntPtr kw) in pythonnet\src\runtime\importhook.cs:line 315
>    at Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args,
> IntPtr kw)
>    at Python.Runtime.ImportHook.__import__(IntPtr self, IntPtr args,
> IntPtr kw) in pythonnet\src\runtime\importhook.cs:line 237
>    at Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args,
> IntPtr kw)
>    at Python.Runtime.ImportHook.__import__(IntPtr self, IntPtr args,
> IntPtr kw) in pythonnet\src\runtime\importhook.cs:line 237
>
>
> if I switch the lines of code
> from bs4 import Beautifulsoup
> import clr
>
> no errors occur.  Is anyone running into this issue?
>
> Thanks.
>
> Danny
>

_________________________________________________
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.