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

Release 6.1.12 breaks installation through github actions #4828

Closed
staur1488 opened this issue Jan 10, 2024 · 26 comments
Closed

Release 6.1.12 breaks installation through github actions #4828

staur1488 opened this issue Jan 10, 2024 · 26 comments
Labels
bug config platformio.ini
Milestone

Comments

@staur1488
Copy link

I can't build expressLRS configuration

gives an error, here is its log

Сборка прошивки
Журналы
Failed to find Platformio on your computer. Trying to install it automatically...
Installer version: 1.1.2

Platform: Windows-10
Python version: 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)]
Python path: D:\����� �����\ExpressLRS Configurator\dependencies\windows_amd64\python\python3.exe

Creating a virtual environment at C:\Users\Igor.platformio\penv

Updating Python package manager (PIP) in a virtual environment

PIP has been successfully updated!
Virtual environment has been successfully created!
Installing PlatformIO Core

Collecting platformio

Using cached platformio-6.1.12-py3-none-any.whl

Collecting bottle==0.12.* (from platformio)

Using cached bottle-0.12.25-py3-none-any.whl (90 kB)

Collecting click<9,>=8.0.4 (from platformio)

Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)

Collecting colorama (from platformio)

Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)

Collecting marshmallow==3.* (from platformio)

Using cached marshmallow-3.20.2-py3-none-any.whl.metadata (7.5 kB)

Collecting pyelftools==0.30 (from platformio)

Using cached pyelftools-0.30-py2.py3-none-any.whl.metadata (381 bytes)

Collecting pyserial==3.5.* (from platformio)

Using cached pyserial-3.5-py2.py3-none-any.whl (90 kB)

Collecting requests==2.* (from platformio)

Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)

Collecting semantic-version==2.10.* (from platformio)

Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)

Collecting tabulate==0.* (from platformio)

Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)

Collecting ajsonrpc==1.2.* (from platformio)

Using cached ajsonrpc-1.2.0-py3-none-any.whl (22 kB)

Collecting starlette<0.35,>=0.19 (from platformio)

Using cached starlette-0.34.0-py3-none-any.whl.metadata (5.8 kB)

Collecting uvicorn<0.26,>=0.16 (from platformio)

Using cached uvicorn-0.25.0-py3-none-any.whl.metadata (6.4 kB)

Collecting wsproto==1.* (from platformio)

Using cached wsproto-1.2.0-py3-none-any.whl (24 kB)

Collecting packaging>=17.0 (from marshmallow==3.*->platformio)

Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)

Collecting charset-normalizer<4,>=2 (from requests==2.*->platformio)

Using cached charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl.metadata (34 kB)

Collecting idna<4,>=2.5 (from requests==2.*->platformio)

Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)

Collecting urllib3<3,>=1.21.1 (from requests==2.*->platformio)

Using cached urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)

Collecting certifi>=2017.4.17 (from requests==2.*->platformio)

Using cached certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)

Collecting h11<1,>=0.9.0 (from wsproto==1.*->platformio)

Using cached h11-0.14.0-py3-none-any.whl (58 kB)

Collecting anyio<5,>=3.4.0 (from starlette<0.35,>=0.19->platformio)

Using cached anyio-4.2.0-py3-none-any.whl.metadata (4.6 kB)

Collecting typing-extensions>=4.0 (from uvicorn<0.26,>=0.16->platformio)

Using cached typing_extensions-4.9.0-py3-none-any.whl.metadata (3.0 kB)

Collecting sniffio>=1.1 (from anyio<5,>=3.4.0->starlette<0.35,>=0.19->platformio)

Using cached sniffio-1.3.0-py3-none-any.whl (10 kB)

Collecting exceptiongroup>=1.0.2 (from anyio<5,>=3.4.0->starlette<0.35,>=0.19->platformio)

Using cached exceptiongroup-1.2.0-py3-none-any.whl.metadata (6.6 kB)

Using cached marshmallow-3.20.2-py3-none-any.whl (49 kB)

Using cached pyelftools-0.30-py2.py3-none-any.whl (177 kB)

Using cached requests-2.31.0-py3-none-any.whl (62 kB)

Using cached click-8.1.7-py3-none-any.whl (97 kB)

Using cached starlette-0.34.0-py3-none-any.whl (70 kB)

Using cached uvicorn-0.25.0-py3-none-any.whl (60 kB)

Using cached anyio-4.2.0-py3-none-any.whl (85 kB)

Using cached certifi-2023.11.17-py3-none-any.whl (162 kB)

Using cached charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl (100 kB)

Using cached idna-3.6-py3-none-any.whl (61 kB)

Using cached packaging-23.2-py3-none-any.whl (53 kB)

Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)

Using cached urllib3-2.1.0-py3-none-any.whl (104 kB)

Using cached exceptiongroup-1.2.0-py3-none-any.whl (16 kB)

Installing collected packages: pyserial, pyelftools, bottle, urllib3, typing-extensions, tabulate, sniffio, semantic-version, packaging, idna, h11, exceptiongroup, colorama, charset-normalizer, certifi, ajsonrpc, wsproto, requests, marshmallow, click, anyio, uvicorn, starlette, platformio

Successfully installed ajsonrpc-1.2.0 anyio-4.2.0 bottle-0.12.25 certifi-2023.11.17 charset-normalizer-3.3.2 click-8.1.7 colorama-0.4.6 exceptiongroup-1.2.0 h11-0.14.0 idna-3.6 marshmallow-3.20.2 packaging-23.2 platformio-6.1.12 pyelftools-0.30 pyserial-3.5 requests-2.31.0 semantic-version-2.10.0 sniffio-1.3.0 starlette-0.34.0 tabulate-0.9.0 typing-extensions-4.9.0 urllib3-2.1.0 uvicorn-0.25.0 wsproto-1.2.0

PlatformIO Core has been successfully installed into an isolated environment C:\Users\Igor\.platformio\penv!

The full path to platformio.exe is C:\Users\Igor\.platformio\penv\Scripts\platformio.exe

If you need an access to platformio.exe from other applications, please install Shell Commands
(add PlatformIO Core binary directory C:\Users\Igor\.platformio\penv\Scripts to the system environment PATH variable):

See https://docs.platformio.org/page/installation.html#install-shell-commands

Can not remove temporary directory D:\1111\ExpressLRS-master\src\.pio\build. Please remove it manually to avoid build issues

TypeError: Traceback (most recent call last):
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio_main_.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
File "C:\Users\Igor.platformio\penv\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\Igor.platformio\penv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\cli.py", line 85, in invoke
return super().invoke(ctx)
File "C:\Users\Igor.platformio\penv\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Igor.platformio\penv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Igor.platformio\penv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\Igor.platformio\penv\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\run\cli.py", line 145, in cli
process_env(
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\run\cli.py", line 191, in process_env
print_processing_header(name, config, verbose)
File "C:\Users\Igor.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\Igor.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\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 222, in
return [(option, self.get(section, option)) for option in self.options(section)]
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 380, in get
value = self.getraw(section, option, default)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 312, in getraw
return self._expand_interpolations(section, option, value)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 338, in _expand_interpolations
return self.VARTPL_RE.sub(
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 339, in
lambda match: self._re_interpolation_handler(section, option, match), value
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 367, in _re_interpolation_handler
value = self.get(section, option)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 380, in get
value = self.getraw(section, option, default)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 289, in getraw
return self._expand_interpolations(section, option, value)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 338, in _expand_interpolations
return self.VARTPL_RE.sub(
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 339, in
lambda match: self._re_interpolation_handler(section, option, match), value
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 367, in _re_interpolation_handler
value = self.get(section, option)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 380, in get
value = self.getraw(section, option, default)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 281, in getraw
option_meta = self.find_option_meta(section, option)
File "C:\Users\Igor.platformio\penv\lib\site-packages\platformio\project\config.py", line 252, in find_option_meta
scope = self.get_section_scope(section)
File "C:\Users\Igor.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:

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

@kyle-pennington-eroad
Copy link

Also having this issue locally on MacOS and on cloud instance of Ubuntu Linux on 6.1.12. Fails to parse platformio.ini.

@ivankravets
Copy link
Member

Could you share your platformio.ini?

@staur1488
Copy link
Author

.platformio.zip
these are the files that the expressLRS configurator downloads

@j123b567
Copy link

Minimal platformio.ini triggering this bug for us is

[env:mydev]
build_flags =
  -DHTTPD_FSDATA_FILE="\"${BUILD_DIR}/fsdata_custom.h\""

@AndriySvs
Copy link

I have the same issue with expressLRS configuration as staur1488 reported.
But the interesting thing is that day before it was working fine.
So any suggestions how to resolve it?

@staur1488
Copy link
Author

I haven't found it yet. :(

@ivankravets
Copy link
Member

Could you replace ${BUILD_DIR} with $BUILD_DIR? See valid usage of Interpolation of Values

@ivankravets
Copy link
Member

@staur1488 , звідки береться platformio.ini? Його інший софт генерує?

@ivankravets ivankravets added this to the 6.1.13 milestone Jan 11, 2024
@ivankravets ivankravets added the config platformio.ini label Jan 11, 2024
@staur1488
Copy link
Author

@ivankravets його завантажте ExpressLRS конфігуратор. Пару днів тому все працювало. Не міняв нічого. Вчора з'явилась ця помилка

@staur1488
Copy link
Author

@ivankravets можу в десь в іншому застосунку скинути відео пояснення шо як робив. Бо в програмних діях не дуже розуміюсь

@j123b567
Copy link

Could you replace ${BUILD_DIR} with $BUILD_DIR? See valid usage of Interpolation of Values

$BUILD_DIR does not solve the problem.
Replacing by ${sysenv.BUILD_DIR} solves the problem.

So the system environment was accidentaly available in the platformio.ini namespace prior 6.1.12 and now it is not?
Maybe some more variables should be added as "built-in variables" to a global namespace to lower the impact of this breaking change.

Unfortunately, I was confused by a lot of other documentation (not about platformio.ini) where this works, and until 6.1.11, it works also in platformio.ini.

It would be also great to just say unknown value of $BUILD_DIR instead of TypeError: argument of type 'NoneType' is not iterable

@j123b567
Copy link

Others are probably using expressLRS and it has something like this in its platformio.ini

[env:ESP_TX_Backpack_via_PASSTHRU]
upload_command = python "$PROJECT_DIR/python/external/esptool/esptool.py" --passthrough -b $UPLOAD_SPEED ${UPLOAD_PORT and "-p "+UPLOAD_PORT} -c esp8266 --before passthru --after hard_reset write_flash 0x0000 "$SOURCE"

@ivankravets
Copy link
Member

${UPLOAD_PORT and "-p "+UPLOAD_PORT}

Have you seen any similar examples for interpolation in our docs? The right solution for this case is https://docs.platformio.org/en/latest/scripting/index.html

The $SCONS_VARIABLE is valid syntax. Some public variables are documented in https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html#built-in-variables

Nevertheless, we are investigating this issue.

@j123b567
Copy link

${UPLOAD_PORT and "-p "+UPLOAD_PORT}

Have you seen any similar examples for interpolation in our docs?

Never seen this syntax in your docs. Honestly, I don't understand, what it should do. I also don't know, what expressLRS really is. I only extracted the suspicious part of their platformio.ini file.

Nevertheless, we are investigating this issue.

Great!

@oturmanenko
Copy link

Faced the same problem.

dotcypress added a commit to dotcypress/ExpressLRS that referenced this issue Jan 11, 2024
@ivankravets
Copy link
Member

Could you re-test with pio upgrade? The issue should be fixed.

@CapnBry
Copy link

CapnBry commented Jan 11, 2024

There's no 6.1.13 available yet, but just editing my source with adab425 resolves the issue in both instances:

  • ${PROJECTSRC_DIR}
  • ${UPLOAD_PORT and "-p "+UPLOAD_PORT}

@j123b567
Copy link

After platformio upgrade --dev
Unfortunately, it still breaks something like

[env:myenv]
platform = ststm32
board = genericSTM32F407VET6
build_flags =
  -Wl,-Map,${BUILD_DIR}/${PROGNAME}.map

With new error

 AttributeError `'str' object has no attribute 'map'' trying to evaluate `$PROGNAME.map'

This was working in 6.1.11

@ivankravets
Copy link
Member

@j123b567, thanks for helping with debugging this issue. There is yet another fix.

Please re-run pio upgrade --dev.

For people who use ExpressLRS, the PlatformIO Core should be located in the %HOME_DIR%/.platformio/penv folder. Unix - bin/pio, Windows - Scripts/pio.exe.

Please confirm that the latest PlatformIO Core development branch compiles firmware without any modifications to the ExpressLRS firmware.

@mha1
Copy link

mha1 commented Jan 11, 2024

Updated via python -m pip install -U https://github.com/platformio/platformio-core/archive/develop.zip

finished ok I guess

...
WARNING: Ignoring invalid distribution ~ (C:\Users\10137\.platformio\penv\Lib\site-packages)
Installing collected packages: platformio
Successfully installed platformio-6.1.13a2

Built unmodified 3.x.x-maintenance and current main with no issues using VSCode/PlatformIO. I also built firmware with the ExpressLRS Configurator using GIT COMMIT to force it to discard pre-built cloud builds. All went well.

@CapnBry
Copy link

CapnBry commented Jan 11, 2024

I can also confirm ExpressLRS main firmware and backpack projects build again in VSCode as well as our Configurator with no changes.

I also had to update with python -m pip install -U https://github.com/platformio/platformio-core/archive/develop.zip as pio upgrade --dev reported Access Denied trying to update pio.exe (hooray Windows filesystem!).

@j123b567
Copy link

j123b567 commented Jan 11, 2024

@j123b567, thanks for helping with debugging this issue. There is yet another fix.

Thank you. Confirming, that it works now for us.

@mha1
Copy link

mha1 commented Jan 11, 2024

Thank you for your quick response

@kyle-pennington-eroad
Copy link

Thanks @ivankravets. Fixed on dev build for me now too.

@russelljahn
Copy link

Thanks for the fix!

I wasn't using ExpressLRS, but still ran into the same TypeError: argument of type 'NoneType' is not iterable issue with an unchanged project that had no issues a month ago.

Switching to the PIO dev branch fixed it for me.

@ivankravets
Copy link
Member

6.1.13 is out! https://github.com/platformio/platformio-core/releases/tag/v6.1.13

Thanks again for your help with this issue 🙏

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

9 participants