Skip to content

_set_entries() got an unexpected keyword argument 'name' #770

@philister

Description

@philister

Describe the bug
I'm new here and I tried the minimal_example

To Reproduce
run the first code snippet from https://github.com/e2nIEE/pandapipes/blob/v0.12.0/tutorials/minimal_example.ipynb

Error message

$ python3 minimal.py
Traceback (most recent call last):
  File "/workspace/minimal.py", line 7, in <module>
    j1 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 1")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pandapipes/create.py", line 113, in create_junction
    _set_entries(net, "junction", index, **dict(zip(cols, vals)), **kwargs)
TypeError: _set_entries() got an unexpected keyword argument 'name'

Expected behavior
No Exception.

pip list
contourpy 1.3.3
cycler 0.12.1
deepdiff 8.6.1
fonttools 4.60.1
geojson 3.2.0
kiwisolver 1.4.9
lxml 6.0.2
matplotlib 3.10.7
networkx 3.6
numpy 2.3.5
orderly-set 5.5.0
packaging 25.0
pandapipes 0.12.0
pandapower 3.2.1
pandas 2.3.3
pillow 12.0.0
pip 25.2
pyparsing 3.2.5
python-dateutil 2.9.0.post0
pytz 2025.2
scipy 1.16.3
shapely 2.1.2
six 1.17.0
tqdm 4.67.1
typing_extensions 4.15.0
tzdata 2025.2

What I did exactly

created minimal.py:

import pandapipes as pp

#create empty net
net = pp.create_empty_network(fluid="lgas")

# create junction
j1 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 1")
j2 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 2")
j3 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 3")

# create junction elements
ext_grid = pp.create_ext_grid(net, junction=j1, p_bar=1.1, t_k=293.15, name="Grid Connection")
sink = pp.create_sink(net, junction=j3, mdot_kg_per_s=0.045, name="Sink")

# create branch element
pipe = pp.create_pipe_from_parameters(net, from_junction=j1, to_junction=j2, length_km=0.1, diameter_m=0.05, name="Pipe 1")
valve = pp.create_valve(net, from_junction=j2, to_junction=j3, diameter_m=0.05, opened=True, name="Valve 1")

ran it in a fresh python container:
$ docker run -v "$PWD:/workspace" -w /workspace python:3 bash -c "pip install pandapipes && python3 minimal.py"

result:

Unable to find image 'python:3' locally
3: Pulling from library/python
53c88f1dfeb7: Already exists 
eae668646f44: Already exists 
ff2e6e687b6c: Already exists 
7c40a3faff76: Already exists 
85694cfea2c4: Pull complete 
d7d82d76b698: Pull complete 
50475ada0cb1: Pull complete 
Digest: sha256:edf6433343f65f94707985869aeaafe8beadaeaee11c4bc02068fca52dce28dd
Status: Downloaded newer image for python:3
Collecting pandapipes
  Downloading pandapipes-0.12.0-py3-none-any.whl.metadata (7.7 kB)
Collecting pandapower>=3.1 (from pandapipes)
  Downloading pandapower-3.2.1-py3-none-any.whl.metadata (8.5 kB)
Collecting matplotlib (from pandapipes)
  Downloading matplotlib-3.10.7-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (11 kB)
Collecting shapely (from pandapipes)
  Downloading shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (6.8 kB)
Collecting pandas~=2.2 (from pandapower>=3.1->pandapipes)
  Downloading pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (91 kB)
Collecting networkx~=3.2 (from pandapower>=3.1->pandapipes)
  Downloading networkx-3.6-py3-none-any.whl.metadata (6.8 kB)
Collecting scipy~=1.13 (from pandapower>=3.1->pandapipes)
  Downloading scipy-1.16.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (62 kB)
Collecting numpy~=2.0 (from pandapower>=3.1->pandapipes)
  Downloading numpy-2.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)
Collecting packaging~=25.0 (from pandapower>=3.1->pandapipes)
  Downloading packaging-25.0-py3-none-any.whl.metadata (3.3 kB)
Collecting tqdm~=4.67 (from pandapower>=3.1->pandapipes)
  Downloading tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
Collecting deepdiff~=8.6 (from pandapower>=3.1->pandapipes)
  Downloading deepdiff-8.6.1-py3-none-any.whl.metadata (8.6 kB)
Collecting geojson~=3.2 (from pandapower>=3.1->pandapipes)
  Downloading geojson-3.2.0-py3-none-any.whl.metadata (16 kB)
Collecting typing_extensions~=4.9 (from pandapower>=3.1->pandapipes)
  Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)
Collecting lxml~=6.0 (from pandapower>=3.1->pandapipes)
  Downloading lxml-6.0.2-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl.metadata (3.6 kB)
Collecting orderly-set<6,>=5.4.1 (from deepdiff~=8.6->pandapower>=3.1->pandapipes)
  Downloading orderly_set-5.5.0-py3-none-any.whl.metadata (6.6 kB)
Collecting python-dateutil>=2.8.2 (from pandas~=2.2->pandapower>=3.1->pandapipes)
  Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting pytz>=2020.1 (from pandas~=2.2->pandapower>=3.1->pandapipes)
  Downloading pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas~=2.2->pandapower>=3.1->pandapipes)
  Downloading tzdata-2025.2-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas~=2.2->pandapower>=3.1->pandapipes)
  Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting contourpy>=1.0.1 (from matplotlib->pandapipes)
  Downloading contourpy-1.3.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (5.5 kB)
Collecting cycler>=0.10 (from matplotlib->pandapipes)
  Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib->pandapipes)
  Downloading fonttools-4.60.1-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl.metadata (112 kB)
Collecting kiwisolver>=1.3.1 (from matplotlib->pandapipes)
  Downloading kiwisolver-1.4.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (6.3 kB)
Collecting pillow>=8 (from matplotlib->pandapipes)
  Downloading pillow-12.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)
Collecting pyparsing>=3 (from matplotlib->pandapipes)
  Downloading pyparsing-3.2.5-py3-none-any.whl.metadata (5.0 kB)
Downloading pandapipes-0.12.0-py3-none-any.whl (1.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 2.8 MB/s  0:00:00
Downloading pandapower-3.2.1-py3-none-any.whl (5.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 2.4 MB/s  0:00:02
Downloading deepdiff-8.6.1-py3-none-any.whl (91 kB)
Downloading geojson-3.2.0-py3-none-any.whl (15 kB)
Downloading lxml-6.0.2-cp314-cp314-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl (5.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.3/5.3 MB 2.4 MB/s  0:00:02
Downloading networkx-3.6-py3-none-any.whl (2.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 2.5 MB/s  0:00:00
Downloading numpy-2.3.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 1.3 MB/s  0:00:12
Downloading orderly_set-5.5.0-py3-none-any.whl (13 kB)
Downloading packaging-25.0-py3-none-any.whl (66 kB)
Downloading pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (12.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.3/12.3 MB 1.6 MB/s  0:00:07
Downloading scipy-1.16.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (35.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 35.7/35.7 MB 2.2 MB/s  0:00:16
Downloading tqdm-4.67.1-py3-none-any.whl (78 kB)
Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Downloading pytz-2025.2-py2.py3-none-any.whl (509 kB)
Downloading six-1.17.0-py2.py3-none-any.whl (11 kB)
Downloading tzdata-2025.2-py2.py3-none-any.whl (347 kB)
Downloading matplotlib-3.10.7-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (9.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.8/9.8 MB 1.2 MB/s  0:00:08
Downloading contourpy-1.3.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (363 kB)
Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.60.1-cp314-cp314-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl (4.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.8/4.8 MB 1.3 MB/s  0:00:03
Downloading kiwisolver-1.4.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 1.3 MB/s  0:00:01
Downloading pillow-12.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 1.2 MB/s  0:00:05
Downloading pyparsing-3.2.5-py3-none-any.whl (113 kB)
Downloading shapely-2.1.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/3.1 MB 1.3 MB/s  0:00:02
Installing collected packages: pytz, tzdata, typing_extensions, tqdm, six, pyparsing, pillow, packaging, orderly-set, numpy, networkx, lxml, kiwisolver, geojson, fonttools, cycler, shapely, scipy, python-dateutil, deepdiff, contourpy, pandas, matplotlib, pandapower, pandapipes

Successfully installed contourpy-1.3.3 cycler-0.12.1 deepdiff-8.6.1 fonttools-4.60.1 geojson-3.2.0 kiwisolver-1.4.9 lxml-6.0.2 matplotlib-3.10.7 networkx-3.6 numpy-2.3.5 orderly-set-5.5.0 packaging-25.0 pandapipes-0.12.0 pandapower-3.2.1 pandas-2.3.3 pillow-12.0.0 pyparsing-3.2.5 python-dateutil-2.9.0.post0 pytz-2025.2 scipy-1.16.3 shapely-2.1.2 six-1.17.0 tqdm-4.67.1 typing_extensions-4.15.0 tzdata-2025.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.

Traceback (most recent call last):
  File "/workspace/minimal.py", line 7, in <module>
    j1 = pp.create_junction(net, pn_bar=1.05, tfluid_k=293.15, name="Junction 1")
  File "/usr/local/lib/python3.14/site-packages/pandapipes/create.py", line 113, in create_junction
    _set_entries(net, "junction", index, **dict(zip(cols, vals)), **kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: _set_entries() got an unexpected keyword argument 'name'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions