{"action":"opened","issue":{"url":"https://api.github.com/repos/nphilipp/python-slip/issues/3","repository_url":"https://api.github.com/repos/nphilipp/python-slip","labels_url":"https://api.github.com/repos/nphilipp/python-slip/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/nphilipp/python-slip/issues/3/comments","events_url":"https://api.github.com/repos/nphilipp/python-slip/issues/3/events","html_url":"https://github.com/nphilipp/python-slip/issues/3","id":156019900,"number":3,"title":"Examples on SlipDBus Trac site do not work.","user":{"login":"awood","id":17975,"avatar_url":"https://avatars.githubusercontent.com/u/17975?v=3","gravatar_id":"","url":"https://api.github.com/users/awood","html_url":"https://github.com/awood","followers_url":"https://api.github.com/users/awood/followers","following_url":"https://api.github.com/users/awood/following{/other_user}","gists_url":"https://api.github.com/users/awood/gists{/gist_id}","starred_url":"https://api.github.com/users/awood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awood/subscriptions","organizations_url":"https://api.github.com/users/awood/orgs","repos_url":"https://api.github.com/users/awood/repos","events_url":"https://api.github.com/users/awood/events{/privacy}","received_events_url":"https://api.github.com/users/awood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-20T18:09:06Z","updated_at":"2016-05-20T18:09:06Z","closed_at":null,"body":"Environment: Fedora 23, Python 2.7.11, python-slip 0.6.4, dbus-python 1.2.0, dbus 1.10.8\r\n\r\nThe example provided on https://fedorahosted.org/python-slip/wiki/SlipDBusService is not working.\r\n\r\n* The Python interpreter throws an error if the scripts are used as it:\r\n\r\n  ```\r\n  Traceback (most recent call last):\r\n    File \"./service.py\", line 29, in <module>\r\n      run_service ()\r\n    File \"./service.py\", line 22, in run_service\r\n      example_object = example_object.ExampleObject (name, \"/org/example/ExampleObject\")\r\n  UnboundLocalError: local variable 'example_object' referenced before assignment\r\n  ```\r\n\r\n* Renaming that variable leads to a service that just times out.\r\n\r\n  ```\r\n  % ./service.py &\r\n  [1] 20622\r\n  Running the example dbus service at 'org.example.ExampleService'.\r\n  % dbus-send --session --print-reply --type=method_call --dest='org.example.ExampleService' '/org/example/ExampleObject' org.example.ExampleObject.hello_world  \r\n  Error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.\r\n  [1]  + 20622 done       ./service.py  \r\n  ```\r\n\r\n  Walking through with the debugger, it looks like when slip adds the ASYNC_CALLBACKS tuple, those values confuse dbus.service into thinking the method is an async method.  It looks like slip is attempting to remove those dummy ASYNC_CALLBACKS values if the method is not async, but it's not working.  When the code returns to \r\n\r\n  ```\r\n  # we're done - the method has got callback functions to reply with\r\n  if parent_method._dbus_async_callbacks:\r\n      return\r\n  ```\r\n\r\n  in dbus.service, `parent_method` still has values in the `_dbus_async_callbacks` tuple.\r\n"}}
{"actor":{"display_login":"awood"}}