question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to load - missing 1 required positional argument: 'number_of_channels'

See original GitHub issue

Hi,

just updated the integration and now it won’t work anymore. Uninstalled and reinstalled it although I didn’t believe it would make a difference and it hasn’t. I put the protocol: artnet in to see if it makes a difference. I also tried without dmx_channels: 512 but same happened.

I don’t see why it is “missing” the number of channels now, I think on that part nothing has changed with the last commit.

Is there anything I can do to help debug? Please help brighten up my home again 😉

The full error:

2021-05-12 19:06:57 ERROR (MainThread) [homeassistant.components.light] Error while setting up dmx platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 231, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/asyncio/coroutines.py", line 124, in coro
res = func(*args, **kw)
File "/config/custom_components/dmx/light.py", line 205, in async_setup_platform
dmx_gateway = ArtNetGateway(host, universe, port, overall_default_level,
File "/config/custom_components/dmx/light.py", line 594, in __init__
super().__init__(host, universe, port, default_level, number_of_channels)
TypeError: __init__() missing 1 required positional argument: 'number_of_channels'

My config:

light:
  - platform: dmx
    host: 10.134.107.26
    port: 6454
    dmx_channels: 512
    protocol: artnet
    send_levels_on_startup: false
    universe: 0
    devices:
      - channel: 1
        name: GWC_RGB
        type: rgb
        default_level: 0
        transition: 5
      - channel: 4
        name: GWC_W
        type: dimmer
        default_level: 0
        transition: 7
      - channel: 5
        name: Kueche 1
        type: rgb
        default_level: 0
        transition: 2
      - channel: 8
        name: Kueche 1w
        type: dimmer
        default_level: 0
        transition: 3
      - channel: 9
        name: Kueche 2
        type: rgb
        default_level: 0
        transition: 5
      - channel: 12
        name: Kueche 2w
        type: dimmer
        default_level: 0
        transition: 6
      - channel: 13
        name: Kueche 3
        type: rgb
        default_level: 0
        transition: 8
      - channel: 16
        name: Kueche 3w
        type: dimmer
        default_level: 0
        transition: 10

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nibblerrickcommented, May 12, 2021

It’s working! Thanks for this insanely fast fix!

1reaction
jnimmocommented, May 12, 2021

Sorry for that, I need to setup a dev branch. I can see the issue (missing default_off argument in the two subclass init methods) and will try and fix it shortly

On Thu, 13 May 2021 at 5:12 AM, nibblerrick @.***> wrote:

Hi,

just updated the integration and now it won’t work anymore. Uninstalled and reinstalled it although I didn’t believe it would make a difference and it hasn’t. I put the protocol: artnet in to see if it makes a difference. I also tried without dmx_channels: 512 but same happened.

I don’t see why it is “missing” the number of channels now, I think on that part nothing has changed with the last commit.

Is there anything I can do to help debug? Please help brighten up my home again 😉

The full error:

2021-05-12 19:06:57 ERROR (MainThread) [homeassistant.components.light] Error while setting up dmx platform for light Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 231, in _async_setup_platform await asyncio.shield(task) File “/usr/local/lib/python3.8/asyncio/coroutines.py”, line 124, in coro res = func(*args, **kw) File “/config/custom_components/dmx/light.py”, line 205, in async_setup_platform dmx_gateway = ArtNetGateway(host, universe, port, overall_default_level, File “/config/custom_components/dmx/light.py”, line 594, in init super().init(host, universe, port, default_level, number_of_channels) TypeError: init() missing 1 required positional argument: ‘number_of_channels’

My config:

light:

  • platform: dmx host: 10.134.107.26 port: 6454 dmx_channels: 512 protocol: artnet send_levels_on_startup: false universe: 0 devices:
    • channel: 1 name: GWC_RGB type: rgb default_level: 0 transition: 5
    • channel: 4 name: GWC_W type: dimmer default_level: 0 transition: 7
    • channel: 5 name: Kueche 1 type: rgb default_level: 0 transition: 2
    • channel: 8 name: Kueche 1w type: dimmer default_level: 0 transition: 3
    • channel: 9 name: Kueche 2 type: rgb default_level: 0 transition: 5
    • channel: 12 name: Kueche 2w type: dimmer default_level: 0 transition: 6
    • channel: 13 name: Kueche 3 type: rgb default_level: 0 transition: 8
    • channel: 16 name: Kueche 3w type: dimmer default_level: 0 transition: 10

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jnimmo/hass-dmx/issues/50, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAO2D3TDC266Z4ILQE4JNLTNKZGVANCNFSM44ZAJVMA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: load() missing 1 required positional argument ...
To solve the error, use the yaml.full_load() method instead or explicitly set the Loader keyword arg. config = yaml.full_load(ymlfile). or
Read more >
load() missing 1 required positional argument: 'Loader'
The Python "TypeError: load() missing 1 required positional argument: 'Loader'" occurs when we use the yaml.load() method without specifying the Loader keyword ...
Read more >
load() missing 1 required positional argument: 'Loader' · Issue ...
While running the predict.py script on any jpg file the following error pops up - File "./DeblurGANv2/predict.py", line 126, in Fire(main) ...
Read more >
TypeError: load() missing 1 positional argument ... - YouTube
TypeError: load () missing 1 required positional argument : 'Loader'ModuleNotFoundError: No module named 'demo'errors in first order model ...
Read more >
XCP_D: Multiproc plugin error: TypeError: load() missing 1 ...
TypeError: load() missing 1 required positional argument: 'Loader'. This is the contents of plugin.yml. plugin: LegacyMultiProc
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found