IronLanguages / ironpython3

Implementation of Python 3.x for .NET Framework that is built on top of the Dynamic Language Runtime.
Apache License 2.0
2.51k stars 290 forks source link

"not a Zip file" - what does it mean?! #1775

Closed sensboston closed 9 months ago

sensboston commented 9 months ago

It's not a "feature request" but a simple question: I read some articles saying the "IronPhyton is best way to incorporate Python into your C# solution". OK, I followed some steps (mostly the same) and trying to run Python script obtained from https://github.com/tsurumeso/vocal-remover But... immediately I got an exception:

Exception thrown: 'IronPython.Runtime.Exceptions.ImportException' in IronPython.Modules.dll
An exception of type 'IronPython.Runtime.Exceptions.ImportException' occurred in IronPython.Modules.dll but was not handled in user code
not a Zip file

Could anyone tell me what's going on?! What the "Zip file"?! No one zip-file was injured until your software reported that nonsense!

So please be honest: should I junk this "IronyPython" and just run normal Python3 with console redirection? BTW, what is this repo stands for?

slozier commented 9 months ago

Congratulations, you just witnessed an exception that was thrown (and then caught). Python includes zipimport.zipimporter in its path hooks that throws a "Not a Zip file" ImportError when a path is (unsurprisingly) not a zip file...

If you want to use vocal-remover then yes I suggest using normal CPython.

sensboston commented 9 months ago

I got rid from all these "python-kind" nuget packages and created a nice console helper C# class, working with the official, standard Python 3. Now everything is working like a charm.