Skip to content

[Bug]: v2.1.0 ElectrodeTable cols #1497

Closed
@CodyCBakerPhD

Description

@CodyCBakerPhD

What happened?

Just ran across this in the NWBInspector CI.

Steps to Reproduce

from pynwb.file import ElectrodeTable

table = ElectrodeTable(
    name="electrodes",  # default name when building through nwbfile
)
table.add_row(
    x=1.0,
    location="unknown",
    group=ElectrodeGroup(name="test_group", description="", device=Device(name="test_device"), location="unknown"),
    group_name="test_group",
)

Traceback

Traceback (most recent call last):

  File "C:\Users\Raven\AppData\Local\Temp\ipykernel_18220\3595234109.py", line 6, in <cell line: 6>
    table.add_row(

  File "C:\Users\Raven\.conda\envs\nwbinspector\lib\site-packages\hdmf\utils.py", line 593, in func_call
    return func(args[0], **pargs)

  File "C:\Users\Raven\.conda\envs\nwbinspector\lib\site-packages\hdmf\common\table.py", line 595, in add_row
    raise ValueError(

ValueError: row data keys don't match available columns
you supplied 1 extra keys: {'x'}
and were missing 0 keys: set()

Operating System

Windows

Python Executable

Python

Python Version

3.9

Package Versions

environment_for_issue.txt

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: bugerrors in the code or code behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions