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

Error when trying to create a composite - within add_emitter #79

Open
sniffo opened this issue Jan 15, 2025 · 0 comments
Open

Error when trying to create a composite - within add_emitter #79

sniffo opened this issue Jan 15, 2025 · 0 comments

Comments

@sniffo
Copy link

sniffo commented Jan 15, 2025

Encountered this error while trying to create a composite after updating the structure of my simulation. The code can be found within the dfba.py file here. It is not obvious where the issue really is, but here is the traceback:

`Traceback (most recent call last):

File "/Applications/PyCharm.app/Contents/plugins/python-ce/helpers/pydev/pydevd.py", line 1570, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script

File "/Applications/PyCharm.app/Contents/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)

File "/Users/tasnifrahman/PycharmProjects/cdFBA/cdFBA/processes/dfba.py", line 461, in
run_environment(core)

File "/Users/tasnifrahman/PycharmProjects/cdFBA/cdFBA/processes/dfba.py", line 393, in run_environment
sim = Composite({

File "/Users/tasnifrahman/PycharmProjects/process-bigraph/process_bigraph/composite.py", line 837, in init
self.add_emitter(

File "/Users/tasnifrahman/PycharmProjects/process-bigraph/process_bigraph/composite.py", line 995, in add_emitter
self.merge(

File "/Users/tasnifrahman/PycharmProjects/process-bigraph/process_bigraph/composite.py", line 1010, in merge
self.composition, self.state = self.core.merge(

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_system.py", line 1255, in merge
return self.generate(top_schema, top_state)

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_system.py", line 2021, in generate
_, _, top_schema, top_state = self.generate_recur(

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_system.py", line 2007, in generate_recur
return generate_function(

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_functions.py", line 1884, in generate_any
subschema, substate, top_schema, top_state = core.generate_recur(

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_system.py", line 2007, in generate_recur
return generate_function(

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_functions.py", line 1953, in generate_map
subschema, generated_state[key], top_schema, top_state = core.generate_recur(

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_system.py", line 2007, in generate_recur
return generate_function(

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/type_functions.py", line 1937, in generate_map
all_keys = union_keys(schema, state) # set(schema.keys()).union(state.keys())

File "/Users/tasnifrahman/PycharmProjects/bigraph-schema/bigraph_schema/utilities.py", line 105, in union_keys
for key in state:
TypeError: 'int' object is not iterable`

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