{"action":"closed","issue":{"url":"https://api.github.com/repos/micropython/micropython-lib/issues/264","repository_url":"https://api.github.com/repos/micropython/micropython-lib","labels_url":"https://api.github.com/repos/micropython/micropython-lib/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython-lib/issues/264/comments","events_url":"https://api.github.com/repos/micropython/micropython-lib/issues/264/events","html_url":"https://github.com/micropython/micropython-lib/issues/264","id":307319448,"number":264,"title":"uasyncio.loop.run_forever() — line 100, TypeError: function takes 2 positional arguments but 1 were given","user":{"login":"stroobandt","id":1105595,"avatar_url":"https://avatars2.githubusercontent.com/u/1105595?v=4","gravatar_id":"","url":"https://api.github.com/users/stroobandt","html_url":"https://github.com/stroobandt","followers_url":"https://api.github.com/users/stroobandt/followers","following_url":"https://api.github.com/users/stroobandt/following{/other_user}","gists_url":"https://api.github.com/users/stroobandt/gists{/gist_id}","starred_url":"https://api.github.com/users/stroobandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stroobandt/subscriptions","organizations_url":"https://api.github.com/users/stroobandt/orgs","repos_url":"https://api.github.com/users/stroobandt/repos","events_url":"https://api.github.com/users/stroobandt/events{/privacy}","received_events_url":"https://api.github.com/users/stroobandt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-21T16:23:58Z","updated_at":"2018-03-22T00:53:20Z","closed_at":"2018-03-22T00:53:20Z","author_association":"NONE","body":"I am running into the following weird `uasyncio` error, only after the loop has executed an arbitrary number of times:\r\n\r\n    Traceback (most recent call last):\r\n      File \"main.py\", line 25, in <module>\r\n      File \"/flash/lib/my_module.py\", line 328, in start\r\n      File \"/flash/lib/my_module.py\", line 326, in start\r\n      File \"/flash/lib/uasyncio/core.py\", line 100, in run_forever\r\n    TypeError: function takes 2 positional arguments but 1 were given\r\n    MicroPython v1.9.3-477-g7b0a020a on 2018-03-21; PYBv1.1 with STM32F405RG\r\n\r\nMy `start()` method is quite trivial:\r\n\r\n    def start(self):\r\n\r\n        try:\r\n            self.loop.run_forever()\r\n        except KeyboardInterrupt or SystemExit:\r\n            sys.exit()\r\n\r\nI have start seeing this error appearing only since I moved my class and methods to a separate `my_module.py`. Pyboard firmware and `uasyncio` are the latest versions. The seemingly random occurrence of this `/flash/lib/uasyncio/core.py` error makes it hard to debug."}}
{"actor":{"display_login":"stroobandt"}}