esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Assertion error with package dependency. Package 'danger' when try to upload ESPhome firmware to esp32-nodemcu. #5140

Open poisonedPawn opened 9 months ago

poisonedPawn commented 9 months ago

The problem

What kind of issue is this?


Configuration

Operating system: MacOsX 14.1.1

PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.11

Description of problem

Problems with depencency 'danger' when try to install esphome on a ESP32 device.

 Steps to reproduce

  1. Install ESPHOME
  2. Create yml file
    
    esphome:
    name: esp32-example
    name_add_mac_suffix: true
    project:
    name: esphome.bluetooth-proxy
    version: "1.0"

esp32: board: esp32doit-devkit-v1 framework: type: esp-idf source: https://github.com/espressif/esp-idf.git version: 4.4.6

platform_version: 5.1.2

# Custom sdkconfig options
sdkconfig_options:
  COMPILER_OPTIMIZATION_SIZE: y
# Advanced tweaking options
advanced:
  ignore_efuse_mac_crc: false

Enable logging

logger:

ota: password: "1234"

wifi: ssid: "A SSDI" password: "password"

Enable fallback hotspot (captive portal) in case wifi connection fails

ap: ssid: "Esp32-Example Fallback Hotspot" password: "another_password"

captive_portal:

Example configuration entry

sensor:

Enable Home Assistant API

api: password: "1234"

3. Run ESPHome run

esphome run esp32-example2.yml


### Which version of ESPHome has the issue?

ESPHome 2023.11.2

### What type of installation are you using?

pip

### Which version of Home Assistant has the issue?

ghcr.io/home-assistant/home-assistant:stable

### What platform are you using?

ESP32-IDF

### Board

Esp32-nodemcu-v1

### Component causing the issue

platformio, package dependency -> danger

### Example YAML snippet

```yaml
esphome:
  name: esp32-example
  name_add_mac_suffix: true
  project:
    name: esphome.bluetooth-proxy
    version: "1.0"

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    source: https://github.com/espressif/esp-idf.git
    version: 4.4.6
    #platform_version: 5.1.2
    # Custom sdkconfig options
    sdkconfig_options:
      COMPILER_OPTIMIZATION_SIZE: y
    # Advanced tweaking options
    advanced:
      ignore_efuse_mac_crc: false

# Enable logging
logger:

ota:
  password: "1234"

wifi:
  ssid: "A SSDI"
  password: "password"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Example Fallback Hotspot"
    password: "another_password"

captive_portal:

# Example configuration entry
sensor:
  - platform: pulse_counter
    pin: 12
    name: "Pulse Counter"

    total:
      name: 'pulse_counter_id'

# Enable Home Assistant API
api:
  password: "1234"
Run ESPHome run
esphome run esp32-example2.yml
Actual Results
{'danger': '^11.2.3', 'axios': '^1.3.3', 'langchain': '^0.0.53', 'openai-gpt-token-counter': '^1.0.3', '@commitlint/lint': '^13.1.0'}
AssertionError

Anything in the logs that might be useful for us?

{'danger': '^11.2.3', 'axios': '^1.3.3', 'langchain': '^0.0.53', 'openai-gpt-token-counter': '^1.0.3', '@commitlint/lint': '^13.1.0'}
AssertionError: Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/__main__.py", line 103, in main
    cli()  # pylint: disable=no-value-for-parameter
    ^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/cli.py", line 85, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/run/cli.py", line 145, in cli
    process_env(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/run/cli.py", line 208, in process_env
    ).process()
      ^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/run/processor.py", line 81, in process
    install_project_env_dependencies(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/commands/install.py", line 132, in install_project_env_dependencies
    _install_project_env_platform(project_env, options),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/commands/install.py", line 149, in _install_project_env_platform
    PlatformPackageManager().install(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/manager/platform.py", line 62, in install
    p.install_required_packages(force=force)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/platform/_packages.py", line 76, in install_required_packages
    self.install_package(name, force=force)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/platform/_packages.py", line 70, in install_package
    return self.pm.install(spec or self.get_package_spec(name), force=force)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/manager/_install.py", line 47, in install
    pkg = self._install(spec, skip_dependencies=skip_dependencies, force=force)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/manager/_install.py", line 91, in _install
    self.install_dependencies(pkg, print_header=False)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/manager/_install.py", line 140, in install_dependencies
    self.install_dependency(dependency)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/manager/_install.py", line 152, in install_dependency
    dependency_compatibility = PackageCompatibility.from_dependency(dependency)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/platformio/package/meta.py", line 72, in from_dependency
    assert isinstance(dependency, dict)
AssertionError

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

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

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

Additional information

No response

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.