Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platformio-ide not found, unable to build, NoneType error #4829

Closed
bryce-g opened this issue Jan 12, 2024 · 2 comments
Closed

Platformio-ide not found, unable to build, NoneType error #4829

bryce-g opened this issue Jan 12, 2024 · 2 comments

Comments

@bryce-g
Copy link

bryce-g commented Jan 12, 2024

Issue:

Can't build or pio run
command 'platformio-ide.serialMonitor' not found
This works on my other win10 PCs and has previously worked on this PC. I've already tried a few different python versions and uninstalling and reinstalling everything.


Configuration

Win10

--------------------------  ------------------------------------------------------
PlatformIO Core             6.1.12
Python                      3.12.1-final.0
System Type                 windows_amd64
Platform                    Windows-10
File System Encoding        utf-8
Locale Encoding             cp1252
PlatformIO Core Directory   C:\Users\<user>\.platformio
PlatformIO Core Executable  C:\Users\<user>\.platformio\penv\Scripts\platformio.exe
Python Executable           C:\Users\<user>\.platformio\penv\Scripts\python.exe
Global Libraries            0
Development Platforms       0
Tools & Toolchains          1
--------------------------  ------------------------------------------------------

Actual Results

TypeError: Traceback (most recent call last):
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\__main__.py", line 103, in main
    cli()  # pylint: disable=no-value-for-parameter
    ^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\click\core.py", line 1157, in __call__    
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\click\core.py", line 1078, in main        
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\cli.py", line 85, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\click\decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\run\cli.py", line 145, in cli
    process_env(
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\run\cli.py", line 191, in process_env
    print_processing_header(name, config, verbose)
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\run\cli.py", line 232, in print_processing_header
    for k, v in config.items(env=env):
                ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 222, in items
    return [(option, self.get(section, option)) for option in self.options(section)]
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 380, in get
    value = self.getraw(section, option, default)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 312, in getraw
    return self._expand_interpolations(section, option, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 338, in _expand_interpolations
    return self.VARTPL_RE.sub(
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 339, in <lambda>
    lambda match: self._re_interpolation_handler(section, option, match), value
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 367, in _re_interpolation_handler
    value = self.get(section, option)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 380, in get
    value = self.getraw(section, option, default)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 281, in getraw
    option_meta = self.find_option_meta(section, option)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 252, in find_option_meta
    scope = self.get_section_scope(section)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\<user>\.platformio\penv\Lib\site-packages\platformio\project\config.py", line 167, in get_section_scope
    return section.split(":", 1)[0] if ":" in section else section
                                       ^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

============================================================

An unexpected error occurred. Further steps:

* Verify that you have the latest version of PlatformIO using
  `python -m pip install -U platformio` command

* Try to find answer in FAQ Troubleshooting section
  https://docs.platformio.org/page/faq/index.html

* Report this problem to the developers
  https://github.com/platformio/platformio-core/issues

============================================================

Expected Results

It build

If problems with PlatformIO Build System:

The content of platformio.ini:

[platformio]
default_envs = main

[env]
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.5.3/platform-espressif32-2.0.5.3.zip

build_type = debug

;; ############################################################
[env:main]
framework = arduino
board = esp-wrover-kit
@russelljahn
Copy link

This might be related to #4828.

I ran into the same issue where PIO threw a TypeError: argument of type 'NoneType' is not iterable exception when parsing my platformio.ini file, and reported it was invalid.

I switched to the dev branch like the attached issue (run pio upgrade --dev), and using the dev branch fixed it for me.

@bryce-g
Copy link
Author

bryce-g commented Jan 12, 2024

Thank you so much, yes that fixed it.

@bryce-g bryce-g closed this as completed Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants