{"action":"created","issue":{"url":"https://api.github.com/repos/pysb/pysb/issues/227","repository_url":"https://api.github.com/repos/pysb/pysb","labels_url":"https://api.github.com/repos/pysb/pysb/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/pysb/pysb/issues/227/comments","events_url":"https://api.github.com/repos/pysb/pysb/issues/227/events","html_url":"https://github.com/pysb/pysb/issues/227","id":167650403,"number":227,"title":"pysb.tools.render_reactions malfunction (or something else regarding render_reaction.py)","user":{"login":"glucksfall","id":20116962,"avatar_url":"https://avatars.githubusercontent.com/u/20116962?v=3","gravatar_id":"","url":"https://api.github.com/users/glucksfall","html_url":"https://github.com/glucksfall","followers_url":"https://api.github.com/users/glucksfall/followers","following_url":"https://api.github.com/users/glucksfall/following{/other_user}","gists_url":"https://api.github.com/users/glucksfall/gists{/gist_id}","starred_url":"https://api.github.com/users/glucksfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glucksfall/subscriptions","organizations_url":"https://api.github.com/users/glucksfall/orgs","repos_url":"https://api.github.com/users/glucksfall/repos","events_url":"https://api.github.com/users/glucksfall/events{/privacy}","received_events_url":"https://api.github.com/users/glucksfall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-26T16:19:52Z","updated_at":"2016-07-27T22:53:05Z","closed_at":null,"body":"Hello everyone,\r\nI have a problem calling `pysb.tools.render_reactions` from terminal. I tested the command with some example files, and some did it right, and other did it wrong like the following output. This output was generated from a custom model, but I will retry some examples to tell you which are functional and which are not, hoping you could tell what to fix inside the model. Thank you.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.5/dist-packages/pysb/bng.py\", line 416, in execute\r\n    \"\\n\" +\r\nTypeError: a bytes-like object is required, not 'str'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/opt/anaconda3/lib/python3.5/runpy.py\", line 170, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/opt/anaconda3/lib/python3.5/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pysb/tools/render_reactions.py\", line 156, in <module>\r\n    print(run(model))\r\n  File \"/usr/local/lib/python3.5/dist-packages/pysb/tools/render_reactions.py\", line 78, in run\r\n    pysb.bng.generate_equations(model)\r\n  File \"/usr/local/lib/python3.5/dist-packages/pysb/bng.py\", line 557, in generate_equations\r\n    lines = iter(generate_network(model,cleanup,verbose=verbose).split('\\n'))\r\n  File \"/usr/local/lib/python3.5/dist-packages/pysb/bng.py\", line 532, in generate_network\r\n    bngfile.execute()\r\n  File \"/usr/local/lib/python3.5/dist-packages/pysb/bng.py\", line 419, in execute\r\n    raise BngInterfaceError(e)\r\npysb.bng.BngInterfaceError: a bytes-like object is required, not 'str'\r\n```"},"comment":{"url":"https://api.github.com/repos/pysb/pysb/issues/comments/235746176","html_url":"https://github.com/pysb/pysb/issues/227#issuecomment-235746176","issue_url":"https://api.github.com/repos/pysb/pysb/issues/227","id":235746176,"user":{"login":"JamesPino","id":3987544,"avatar_url":"https://avatars.githubusercontent.com/u/3987544?v=3","gravatar_id":"","url":"https://api.github.com/users/JamesPino","html_url":"https://github.com/JamesPino","followers_url":"https://api.github.com/users/JamesPino/followers","following_url":"https://api.github.com/users/JamesPino/following{/other_user}","gists_url":"https://api.github.com/users/JamesPino/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesPino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesPino/subscriptions","organizations_url":"https://api.github.com/users/JamesPino/orgs","repos_url":"https://api.github.com/users/JamesPino/repos","events_url":"https://api.github.com/users/JamesPino/events{/privacy}","received_events_url":"https://api.github.com/users/JamesPino/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T22:53:05Z","updated_at":"2016-07-27T22:53:05Z","body":"Does this only happen with render_reactions?  It seems that bionetgen gives an error. The error is being mishandled in python3 by pysb.\r\nIt shouldn't be hard to fix the exception, I just can't seem to find a model that raises one where it fails. Once we fix this then we should be able to see your error.\r\n\r\nCan you provide a model where you get this error? Did you find any pysb.examples that can reproduce this?\r\n\r\n\r\n"}}
{"actor":{"display_login":"JamesPino"}}