{"action":"created","issue":{"url":"https://api.github.com/repos/mu-editor/mu/issues/351","repository_url":"https://api.github.com/repos/mu-editor/mu","labels_url":"https://api.github.com/repos/mu-editor/mu/issues/351/labels{/name}","comments_url":"https://api.github.com/repos/mu-editor/mu/issues/351/comments","events_url":"https://api.github.com/repos/mu-editor/mu/issues/351/events","html_url":"https://github.com/mu-editor/mu/issues/351","id":300814367,"number":351,"title":"Raspberry Pi - Debugger fails to start \"Unable to connect\"","user":{"login":"martinohanlon","id":2329501,"avatar_url":"https://avatars3.githubusercontent.com/u/2329501?v=4","gravatar_id":"","url":"https://api.github.com/users/martinohanlon","html_url":"https://github.com/martinohanlon","followers_url":"https://api.github.com/users/martinohanlon/followers","following_url":"https://api.github.com/users/martinohanlon/following{/other_user}","gists_url":"https://api.github.com/users/martinohanlon/gists{/gist_id}","starred_url":"https://api.github.com/users/martinohanlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinohanlon/subscriptions","organizations_url":"https://api.github.com/users/martinohanlon/orgs","repos_url":"https://api.github.com/users/martinohanlon/repos","events_url":"https://api.github.com/users/martinohanlon/events{/privacy}","received_events_url":"https://api.github.com/users/martinohanlon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-27T22:16:34Z","updated_at":"2018-02-28T09:08:55Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Using mu 1.0.0.beta15 on a Raspberry Pi, when clicking debug, the debugger fails to start.\r\n\r\nYou are presented with:\r\n\r\n```\r\nUnable to connect to the Python debugger.\r\n\r\nConnection timed out. Is your machine slow or busy? Free up some of the machine's resources and try again.\r\n\r\n---------- FINISHED ----------\r\nexit code: 1 status: -1\r\n```\r\n\r\nDetails from the log file.\r\n\r\nStarting Mu 1.0.0.beta.15\r\n2018-02-27 22:11:54,945 - root:113(run) INFO: uname_result(system='Linux', node='raspberrypi', release='4.9.59-v7+', version='#1047 SMP Sun Oct 29 12:19:23 GMT 2017', machine='armv7l', processor='')\r\n2018-02-27 22:11:54,945 - root:114(run) INFO: Python path: ['/home/pi/mu', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-arm-linux-gnueabihf', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages', '/usr/local/lib/python3.5/dist-packages/IPython/extensions']\r\n2018-02-27 22:11:55,490 - mu.logic:355(__init__) INFO: Setting up editor.\r\n2018-02-27 22:11:55,491 - mu.logic:366(__init__) INFO: Settings path: /home/pi/.local/share/mu/settings.json\r\n2018-02-27 22:11:55,491 - mu.logic:367(__init__) INFO: Log directory: /home/pi/.cache/mu/log\r\n2018-02-27 22:11:55,492 - mu.logic:368(__init__) INFO: Data directory: /home/pi/.local/share/mu\r\n2018-02-27 22:11:55,627 - mu.logic:376(setup) INFO: Available modes: adafruit, python, pygamezero, microbit, debugger\r\n2018-02-27 22:11:55,826 - mu.logic:712(change_mode) INFO: Workspace directory: /home/pi/mu_code\r\n2018-02-27 22:11:55,827 - mu.logic:415(restore_session) INFO: Restoring session from: /home/pi/.local/share/mu/settings.json\r\n2018-02-27 22:11:55,828 - mu.logic:416(restore_session) DEBUG: {'workspace': '/home/pi/mu_code', 'mode': 'python', 'theme': 'day', 'paths': ['/home/pi/mu_code/hi.py'], 'microbit_runtime_hex': None}\r\n2018-02-27 22:11:55,829 - mu.logic:470(_load) INFO: Loading script from: /home/pi/mu_code/hi.py\r\n2018-02-27 22:11:55,830 - mu.logic:498(_load) DEBUG: print(\"hi\")\r\n\r\nprint(\"bye\")\r\n\r\nprint(\"welcome\")\r\n\r\nprint(\"goodbye\")\r\n\r\n2018-02-27 22:11:56,485 - mu.logic:435(restore_session) INFO: Loaded files.\r\n2018-02-27 22:11:56,562 - mu.logic:712(change_mode) INFO: Workspace directory: /home/pi/mu_code\r\n2018-02-27 22:11:58,941 - mu.logic:668(show_logs) INFO: Showing logs from /home/pi/.cache/mu/log/mu.log\r\n2018-02-27 22:14:10,305 - mu.modes.python3:162(run_script) DEBUG: print(\"hi\")\r\n\r\nprint(\"bye\")\r\n\r\nprint(\"welcome\")\r\n\r\nprint(\"goodbye\")\r\n\r\n2018-02-27 22:14:10,321 - mu.interface.panes:602(start_process) INFO: Running script: /home/pi/mu_code/hi.py\r\n2018-02-27 22:14:10,322 - mu.interface.panes:604(start_process) INFO: Running with interactive mode.\r\n2018-02-27 22:14:10,323 - mu.interface.panes:607(start_process) INFO: Command args: []\r\n2018-02-27 22:14:10,326 - mu.interface.panes:613(start_process) INFO: Working directory: /home/pi/mu_code\r\n2018-02-27 22:14:10,327 - mu.interface.panes:618(start_process) INFO: Python path: ['/home/pi/mu', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-arm-linux-gnueabihf', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages', '/usr/local/lib/python3.5/dist-packages/IPython/extensions']\r\n2018-02-27 22:14:12,065 - mu.modes.python3:172(stop_script) DEBUG: Stopping script.\r\n2018-02-27 22:14:12,576 - mu.modes.python3:183(debug) INFO: Starting debug mode.\r\n2018-02-27 22:14:12,660 - mu.logic:712(change_mode) INFO: Workspace directory: /home/pi/mu_code\r\n2018-02-27 22:14:12,660 - mu.modes.debugger:112(start) DEBUG: print(\"hi\")\r\n\r\nprint(\"bye\")\r\n\r\nprint(\"welcome\")\r\n\r\nprint(\"goodbye\")\r\n\r\n2018-02-27 22:14:12,668 - mu.interface.panes:602(start_process) INFO: Running script: /home/pi/mu_code/hi.py\r\n2018-02-27 22:14:12,668 - mu.interface.panes:607(start_process) INFO: Command args: []\r\n2018-02-27 22:14:12,669 - mu.interface.panes:613(start_process) INFO: Working directory: /home/pi/mu_code\r\n2018-02-27 22:14:12,669 - mu.interface.panes:618(start_process) INFO: Python path: ['/home/pi/mu', '/usr/lib/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-arm-linux-gnueabihf', '/usr/lib/python3.5/lib-dynload', '/usr/local/lib/python3.5/dist-packages', '/usr/lib/python3/dist-packages', '/usr/local/lib/python3.5/dist-packages/IPython/extensions']\r\n2018-02-27 22:14:22,600 - mu.debugger.client:195(on_fail) ERROR: Connection timed out. Is your machine slow or busy? Free up some of the machine's resources and try again.\r\n2018-02-27 22:14:23,858 - mu.logic:668(show_logs) INFO: Showing logs from /home/pi/.cache/mu/log/mu.log\r\n"},"comment":{"url":"https://api.github.com/repos/mu-editor/mu/issues/comments/369168877","html_url":"https://github.com/mu-editor/mu/issues/351#issuecomment-369168877","issue_url":"https://api.github.com/repos/mu-editor/mu/issues/351","id":369168877,"user":{"login":"martinohanlon","id":2329501,"avatar_url":"https://avatars3.githubusercontent.com/u/2329501?v=4","gravatar_id":"","url":"https://api.github.com/users/martinohanlon","html_url":"https://github.com/martinohanlon","followers_url":"https://api.github.com/users/martinohanlon/followers","following_url":"https://api.github.com/users/martinohanlon/following{/other_user}","gists_url":"https://api.github.com/users/martinohanlon/gists{/gist_id}","starred_url":"https://api.github.com/users/martinohanlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinohanlon/subscriptions","organizations_url":"https://api.github.com/users/martinohanlon/orgs","repos_url":"https://api.github.com/users/martinohanlon/repos","events_url":"https://api.github.com/users/martinohanlon/events{/privacy}","received_events_url":"https://api.github.com/users/martinohanlon/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T09:08:55Z","updated_at":"2018-02-28T09:08:55Z","author_association":"CONTRIBUTOR","body":"Ok, so looking at setup.py mu-debug uses\r\n\r\n```\r\nmu.app:run\r\n```\r\n\r\nSo, I created a small program to launch mu in debug mode:\r\n\r\n```\r\n#!/usr/bin/env python3\r\nfrom mu.app import debug\r\n\r\nif __name__ == \"__main__\":\r\n    debug()\r\n```\r\n\r\nIt fails to start with the error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"debug.py\", line 6, in <module>\r\n    debug()\r\n  File \"/home/pi/mu/mu/app.py\", line 150, in debug\r\n    filename = os.path.normcase(os.path.abspath(sys.argv[1]))\r\nIndexError: list index out of range\r\n```\r\n"}}
{"actor":{"display_login":"martinohanlon"}}