Hello Greg,
thank you for your answer. I have checked it twice and the file is really
empty.
I even opened it with a hex editor - no content.
BUT in order to create a bug ticket I tried to make a mcve and I didn't
succeed.
I copied the function (load_plugins) 1 to 1, but outside my program it
works as it should.
So it seems that something inside my application is causing this problem.
Hmm ... Fortunately this is a pure python application so debugging should
lead to enlightenment. :-)

Thx
Eren

Am So., 20. Sept. 2020 um 02:06 Uhr schrieb Greg Ewing <
greg.ew...@canterbury.ac.nz>:

> On 19/09/20 7:51 am, Eko palypse wrote:
> > ValueError: source code string cannot contain null bytes
> >
> > Any idea what happened here?
>
> > Seems I've missed that __init__.py's aren't allowed to be empty anymore.
> > Adding a single # solved the issue.
>
> I just tried importing a package with an empty __init__.py in
> Python 3.8 and there was no problem:
>
> % ls -l empty
> total 0
> -rw-r--r--  1 greg  staff  0 20 Sep 12:00 __init__.py
> % python3
> Python 3.8.2 (default, Mar 23 2020, 11:36:18)
> [Clang 8.1.0 (clang-802.0.42)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> import empty
>  >>>
>
> It looks more like the file in question wasn't completely empty,
> but had a null character in it for some reason. I expect that if
> you re-saved it as truly empty it would work. If not, you should
> probably report it as a bug.
>
> --
> Greg
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to