🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5stack core2 :ImportError: cannot import name 'Serial' from 'serial'

    Scheduled Pinned Locked Moved Core 2
    1 Posts 1 Posters 2.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      loris
      last edited by

      hello, I'm on m5stack core2 and when I want to send or even compile my project, I have this error:
      ImportError: cannot import name 'Serial' from 'serial' (C:\Users\Home.platformio\penv\lib\site-packages\serial_init_.py):
      File "C:\Users\Home.platformio\penv\lib\site-packages\platformio\builder\main.py", line 97:
      env = DefaultEnvironment(**DEFAULT_ENV_OPTIONS)
      File "C:\Users\Home.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Defaults.py", line 83:
      default_env = SCons.Environment.Environment(*args, **kw)
      File "C:\Users\Home.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Environment.py", line 1010:
      apply_tools(self, tools, toolpath)
      File "C:\Users\Home.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Environment.py", line 116:
      _ = env.Tool(tool)
      File "C:\Users\Home.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Environment.py", line 1878:
      tool = SCons.Tool.Tool(tool, toolpath, **kwargs)
      File "C:\Users\Home.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Tool_init
      .py", line 120:
      module = self.tool_module()
      File "C:\Users\Home.platformio\packages\tool-scons\scons-local-4.3.0\SCons\Tool_init
      .py", line 209:
      module = spec.loader.load_module(spec.name)
      File "<frozen importlib._bootstrap_external>", line 529:

      File "<frozen importlib._bootstrap_external>", line 1029:

      File "<frozen importlib._bootstrap_external>", line 854:

      File "<frozen importlib._bootstrap>", line 274:

      File "<frozen importlib._bootstrap>", line 711:

      File "<frozen importlib._bootstrap>", line 680:

      File "<frozen importlib._bootstrap_external>", line 850:

      File "<frozen importlib._bootstrap>", line 228:

      File "C:\Users\Home.platformio\penv\lib\site-packages\platformio\builder\tools\pioupload.py", line 26:
      from serial import Serial, SerialException

      Everything was working fine until i installed atom on my pc

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post