{"action":"created","issue":{"url":"https://api.github.com/repos/openbabel/openbabel/issues/1341","repository_url":"https://api.github.com/repos/openbabel/openbabel","labels_url":"https://api.github.com/repos/openbabel/openbabel/issues/1341/labels{/name}","comments_url":"https://api.github.com/repos/openbabel/openbabel/issues/1341/comments","events_url":"https://api.github.com/repos/openbabel/openbabel/issues/1341/events","html_url":"https://github.com/openbabel/openbabel/issues/1341","id":209581790,"number":1341,"title":"Python SWIG - Error when calling OBRotorList::Init ","user":{"login":"openbabel-bot","id":25939323,"avatar_url":"https://avatars3.githubusercontent.com/u/25939323?v=4","gravatar_id":"","url":"https://api.github.com/users/openbabel-bot","html_url":"https://github.com/openbabel-bot","followers_url":"https://api.github.com/users/openbabel-bot/followers","following_url":"https://api.github.com/users/openbabel-bot/following{/other_user}","gists_url":"https://api.github.com/users/openbabel-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openbabel-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openbabel-bot/subscriptions","organizations_url":"https://api.github.com/users/openbabel-bot/orgs","repos_url":"https://api.github.com/users/openbabel-bot/repos","events_url":"https://api.github.com/users/openbabel-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openbabel-bot/received_events","type":"User","site_admin":false},"labels":[{"id":545069043,"url":"https://api.github.com/repos/openbabel/openbabel/labels/auto-migrated","name":"auto-migrated","color":"ededed","default":false},{"id":245402776,"url":"https://api.github.com/repos/openbabel/openbabel/labels/bug","name":"bug","color":"e11d21","default":true},{"id":545070536,"url":"https://api.github.com/repos/openbabel/openbabel/labels/high%20priority","name":"high priority","color":"ededed","default":false},{"id":545704148,"url":"https://api.github.com/repos/openbabel/openbabel/labels/python","name":"python","color":"ededed","default":false},{"id":545704447,"url":"https://api.github.com/repos/openbabel/openbabel/labels/swig","name":"swig","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"openbabel-bot","id":25939323,"avatar_url":"https://avatars3.githubusercontent.com/u/25939323?v=4","gravatar_id":"","url":"https://api.github.com/users/openbabel-bot","html_url":"https://github.com/openbabel-bot","followers_url":"https://api.github.com/users/openbabel-bot/followers","following_url":"https://api.github.com/users/openbabel-bot/following{/other_user}","gists_url":"https://api.github.com/users/openbabel-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openbabel-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openbabel-bot/subscriptions","organizations_url":"https://api.github.com/users/openbabel-bot/orgs","repos_url":"https://api.github.com/users/openbabel-bot/repos","events_url":"https://api.github.com/users/openbabel-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openbabel-bot/received_events","type":"User","site_admin":false},"assignees":[{"login":"openbabel-bot","id":25939323,"avatar_url":"https://avatars3.githubusercontent.com/u/25939323?v=4","gravatar_id":"","url":"https://api.github.com/users/openbabel-bot","html_url":"https://github.com/openbabel-bot","followers_url":"https://api.github.com/users/openbabel-bot/followers","following_url":"https://api.github.com/users/openbabel-bot/following{/other_user}","gists_url":"https://api.github.com/users/openbabel-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/openbabel-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openbabel-bot/subscriptions","organizations_url":"https://api.github.com/users/openbabel-bot/orgs","repos_url":"https://api.github.com/users/openbabel-bot/repos","events_url":"https://api.github.com/users/openbabel-bot/events{/privacy}","received_events_url":"https://api.github.com/users/openbabel-bot/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2015-06-11T19:59:22Z","updated_at":"2018-04-23T15:28:46Z","closed_at":null,"author_association":"COLLABORATOR","body":"Hello everyone,\r\n\r\nI think I've found a bug in the Python SWIG interface.\r\nI tried to use the Init method of OBRotorList and received the following error:\r\nTypeError: in method 'OBRotorList_Init', argument 2 of type 'std::string &'\r\n\r\nBelow I paste the call of the function, showing how it is in my code:\r\nrbonds = openbabel.OBRotorList()\r\ntemp = tempfile.NamedTemporaryFile(mode='w+t')\r\n\ttry:\r\n\t\ttemp.write(\"[!$(*#*)&!D1]-!@[!$(*#*)&!D1] 1 2 3 4 60.0 -60.0 180.0 160.0 -160.0 90.0 -90.0 120.0 -120.0\")\r\n\t\tprint temp.name\r\n\t\trbonds.Init(temp.name) # bug in openbabel 2.3.2 -- problem in swig interface\r\n\tfinally:\r\n\t\ttemp.close()\t\r\n\r\nLooking for a solution I found that the problem may be in the interface, in which an \"%include std_string.i\" may be missing (see, e.g., http://stackoverflow.com/questions/6090976/swig-python-c-typeerror-in-method-geodatabase-open-argument-2-of-type)\r\n\r\nThis one may be easy to fix, but unfortunately I have no knowledge in SWIG or OpenBabel to create a patch for it.\r\n\r\nBest Regards,\r\nHenrique.\n\nReported by: hmcezar\n\nOriginal Ticket: [openbabel/bugs/962](https://sourceforge.net/p/openbabel/bugs/962)"},"comment":{"url":"https://api.github.com/repos/openbabel/openbabel/issues/comments/383616772","html_url":"https://github.com/openbabel/openbabel/issues/1341#issuecomment-383616772","issue_url":"https://api.github.com/repos/openbabel/openbabel/issues/1341","id":383616772,"user":{"login":"ghutchis","id":41128,"avatar_url":"https://avatars2.githubusercontent.com/u/41128?v=4","gravatar_id":"","url":"https://api.github.com/users/ghutchis","html_url":"https://github.com/ghutchis","followers_url":"https://api.github.com/users/ghutchis/followers","following_url":"https://api.github.com/users/ghutchis/following{/other_user}","gists_url":"https://api.github.com/users/ghutchis/gists{/gist_id}","starred_url":"https://api.github.com/users/ghutchis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghutchis/subscriptions","organizations_url":"https://api.github.com/users/ghutchis/orgs","repos_url":"https://api.github.com/users/ghutchis/repos","events_url":"https://api.github.com/users/ghutchis/events{/privacy}","received_events_url":"https://api.github.com/users/ghutchis/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T15:28:46Z","updated_at":"2018-04-23T15:28:46Z","author_association":"OWNER","body":"My count inside includes/openbabel is 318 lines. That includes some documentation, but seems managable."}}
{"actor":{"display_login":"ghutchis"}}