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

pio core crash in project/config.py: TypeError: sequence item 1: expected str instance, list found #4082

Closed
1 task done
julianneswinoga opened this issue Oct 16, 2021 · 2 comments
Assignees
Labels
bug config platformio.ini
Milestone

Comments

@julianneswinoga
Copy link

What kind of issue is this?

  • PlatformIO Core.
    If you’ve found a bug, please provide an information below.

Configuration

Operating system:

$ cat /etc/*release
Manjaro Linux
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=21.1.5
DISTRIB_CODENAME=Pahvo
DISTRIB_DESCRIPTION="Manjaro Linux"
Manjaro Linux
NAME="Manjaro Linux"
ID=manjaro
ID_LIKE=arch
BUILD_ID=rolling
PRETTY_NAME="Manjaro Linux"
ANSI_COLOR="32;1;24;144;200"
HOME_URL="https://manjaro.org/"
DOCUMENTATION_URL="https://wiki.manjaro.org/"
SUPPORT_URL="https://manjaro.org/"
BUG_REPORT_URL="https://bugs.manjaro.org/"
LOGO=manjarolinux

PlatformIO Version (platformio --version):

$ platformio --version
legacy Click
PlatformIO Core, version 5.2.1

Description of problem

Hard crash when trying to build an environment.

Steps to Reproduce

  1. Clone https://github.com/cameronswinoga/OpenAstroTracker-Firmware
  2. Checkout commit cb2407e5c5f (git checkout cb2407e5c5f)
  3. Run pio run -e mksgenlv21
  4. See build system crash

Actual Results

$ pio run -e mksgenlv21
legacy Click
Can not remove temporary directory `/home/cameron/projects/OpenAstroTracker-Firmware/.pio/build`. Please remove it manually to avoid build issues
Error: Traceback (most recent call last):
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/__main__.py", line 130, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/commands/__init__.py", line 44, in invoke
    return super(PlatformioCLI, self).invoke(ctx)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/commands/run/command.py", line 134, in cli
    process_env(
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/commands/run/command.py", line 171, in process_env
    print_processing_header(name, config, verbose)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/commands/run/command.py", line 197, in print_processing_header
    for k, v in config.items(env=env):
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/project/config.py", line 228, in items
    return [(option, self.get(section, option)) for option in self.options(section)]
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/project/config.py", line 228, in <listcomp>
    return [(option, self.get(section, option)) for option in self.options(section)]
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/project/config.py", line 303, in get
    value = self.getraw(section, option, default)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/project/config.py", line 283, in getraw
    return self._expand_interpolations(value)
  File "/home/cameron/.platformio/penv/lib/python3.9/site-packages/platformio/project/config.py", line 292, in _expand_interpolations
    return self.VARTPL_RE.sub(self._re_interpolation_handler, value)
TypeError: sequence item 1: expected str instance, list found

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

An unexpected error occurred. Further steps:

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

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

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

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

Expected Results

For platformio to try and build the project 😄

Additional info

Note that this only crashes with the latest commit on that branch (feature/cs/add-initial-unit-test). I.e. the crash happens with cb2407e5c5f but not with 0cd08812592.

@ivankravets ivankravets added this to the 5.2.2 milestone Oct 19, 2021
@ivankravets ivankravets added bug config platformio.ini labels Oct 19, 2021
@ivankravets ivankravets self-assigned this Oct 19, 2021
@ivankravets
Copy link
Member

Thanks for the report! Please re-test with pio upgrade --dev.

@julianneswinoga
Copy link
Author

Yep all fixed! Thanks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug config platformio.ini
Projects
None yet
Development

No branches or pull requests

2 participants