Python Forum
Error on import: SyntaxError: source code string cannot contain null bytes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error on import: SyntaxError: source code string cannot contain null bytes
#6
Try this
>>> from importlib.util import find_spec
>>> spec = find_spec('fibo')
>>> print(spec)
Reply


Messages In This Thread
RE: Error on import: SyntaxError: source code string cannot contain null bytes - by Gribouillis - Aug-01-2023, 06:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Algorithm for extracting comments from Python source code Pavel1982 7 2,847 Aug-28-2024, 02:50 AM
Last Post: timothyferriss
  delivery exe without source code py loky62 2 1,151 Apr-04-2024, 05:47 PM
Last Post: loky62
  How to express null value klatlap 3 1,891 Mar-25-2023, 10:40 AM
Last Post: klatlap
  import module error tantony 5 4,935 Dec-15-2022, 01:55 PM
Last Post: Lauraburmrs
  Cryptic Error with import statement Led_Zeppelin 2 3,572 Jan-11-2022, 01:13 PM
Last Post: Led_Zeppelin
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 12,992 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  No Module found in other directory than source code [SOLVED] AlphaInc 1 3,216 Nov-10-2021, 04:34 PM
Last Post: AlphaInc
  Generating classes diagram from source code Pavel_47 3 7,827 Oct-01-2021, 03:31 AM
Last Post: Lou
  How do I open the Source code of a library? JaneTan 1 3,185 Aug-18-2021, 02:12 AM
Last Post: Larz60+
Sad SyntaxError: from simple python example file from mind-monitor code (muse 2) warmcupoftea 4 3,911 Jul-16-2021, 02:51 PM
Last Post: warmcupoftea

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020