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

Valve generates error #1

Open
watturkara opened this issue Apr 20, 2021 · 0 comments
Open

Valve generates error #1

watturkara opened this issue Apr 20, 2021 · 0 comments

Comments

@watturkara
Copy link

watturkara commented Apr 20, 2021

When I try to run example code adapted from the MINT wiki, it generates the following error:

Traceback (most recent call last):
  File "//.pyenv/versions/3.8.0/bin/fluigi", line 8, in <module>
    sys.exit(main())
  File "//.pyenv/versions/3.8.0/lib/python3.8/site-packages/fluigi/cmdline.py", line 243, in main
    par_device = generate_device_from_parchmint(str(temp_parchmint_file))
  File "//.pyenv/versions/3.8.0/lib/python3.8/site-packages/fluigi/cmdline.py", line 80, in generate_device_from_parchmint
    return Device(device_json)
  File "/pybin/pyparchmint/parchmint/device.py", line 71, in __init__
    self.parse_from_json(json)
  File "/pybin/pyparchmint/parchmint/device.py", line 296, in parse_from_json
    self._valve_map[self.get_component(key)] = self.get_connection(value)
TypeError: unhashable type: 'Component'

It seems this is an issue with placing Valves in general. Here is the code I ran to generate this error:

  DEVICE net_test
  
  LAYER FLOW
  PORT p1, p2 portRadius=100;
  V LONG CELL TRAP ct1 numberOfChambers=10 chamberWidth=100 chamberLength=100 chamberSpacing=50 feedingChannelWidth=100;
  
  CHANNEL c1 from p1 3 to ct1 1 channelWidth=100;
  CHANNEL c2 from ct1 2 to p2 1 channelWidth=100;
  
  END LAYER
  
  LAYER CONTROL
  PORT p3 portRadius=100;
  VALVE v1 on c1 width=300 length=100;
  VALVE v2 on c2 width=300 length=100;
  NET net1 from p3 1 to v1 4, v2 4 channelWidth=50;
  END LAYER 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant