{"action":"created","issue":{"url":"https://api.github.com/repos/adafruit/circuitpython/issues/1029","repository_url":"https://api.github.com/repos/adafruit/circuitpython","labels_url":"https://api.github.com/repos/adafruit/circuitpython/issues/1029/labels{/name}","comments_url":"https://api.github.com/repos/adafruit/circuitpython/issues/1029/comments","events_url":"https://api.github.com/repos/adafruit/circuitpython/issues/1029/events","html_url":"https://github.com/adafruit/circuitpython/issues/1029","id":341290045,"node_id":"MDU6SXNzdWUzNDEyOTAwNDU=","number":1029,"title":"mpfshell and rshell no longer work under V3.0.0 on ESP8266","user":{"login":"StephenHeathcote","id":37562777,"node_id":"MDQ6VXNlcjM3NTYyNzc3","avatar_url":"https://avatars2.githubusercontent.com/u/37562777?v=4","gravatar_id":"","url":"https://api.github.com/users/StephenHeathcote","html_url":"https://github.com/StephenHeathcote","followers_url":"https://api.github.com/users/StephenHeathcote/followers","following_url":"https://api.github.com/users/StephenHeathcote/following{/other_user}","gists_url":"https://api.github.com/users/StephenHeathcote/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenHeathcote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenHeathcote/subscriptions","organizations_url":"https://api.github.com/users/StephenHeathcote/orgs","repos_url":"https://api.github.com/users/StephenHeathcote/repos","events_url":"https://api.github.com/users/StephenHeathcote/events{/privacy}","received_events_url":"https://api.github.com/users/StephenHeathcote/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-15T03:59:28Z","updated_at":"2018-07-15T16:17:56Z","closed_at":null,"author_association":"NONE","body":"I am a beginning user of circuit python but have some experience with micro python.  Today I flashed a new Feather Huzzah with the latest V3.0.0 firmware.  I was able to get to a repl prompt with screen without problems. I then tried to access the device with mpfshell but get an error on open\r\n\r\n```\r\n** Micropython File Shell v0.8.1, sw@kaltpost.de ** \r\n-- Running on Python 3.5 using PySerial 3.4 --\r\n\r\nmpfs [/]> open ttyUSB0\r\n\r\n('exception', b'', b'Traceback (most recent call last):\\r\\n  File \"<stdin>\", line 1, in <module>\\r\\nImportError: no module named \\'ubinascii\\'\\r\\n')\r\n\r\n```\r\nI noticed the following in the V3.0.0 release notes:\r\n\r\n> - ubinascii is renamed binascii to match CPython. Thanks @jepler\r\n\r\n\r\nSo it seems that the failure of mpfshell is an unintended side effect of renaming ubinascii.\r\n\r\nI cloned the mpfshell source code from github  (https://github.com/wendlers/mpfshell) and hacked it to substitute binascii for ubinascii  in four lines and got it to work\r\n\r\n```\r\n** Micropython File Shell v0.8.1, sw@kaltpost.de ** \r\n-- Running on Python 3.5 using PySerial 3.4 --\r\n\r\nmpfs [/]> open ttyUSB0\r\nConnected to esp8266\r\nmpfs [/]> repl\r\n\r\n*** Exit REPL with Ctrl+] ***>\r\n```\r\nSo I have a work around, and perhaps with some work could make the code of mpfshell work with either \"ubinascii\" or \"binascii\"  so that it could be used with circuit python or micropython.\r\n\r\nIn the process of debugging this I tried rshell which also fails.  rshell also uses ubinascii but the code is somewhat more convoluted so my quick attempt at hacking it did not fix the problem or perhaps there are more issues in that case.   The error message did not so obviously point to ubinascii as the problem \r\n\r\nI know that the elimination of the \"u\" prefixes is  a deliberate effort to align circuit python with CPython and understand the motivation. So this is an unfortunate side effect of a planned change rather than a bug,   But equally it is not a bug in mpfshell.   \r\n\r\nAnyway  I thought it was worth flagging for others who might encounter the same difficulty\r\n"},"comment":{"url":"https://api.github.com/repos/adafruit/circuitpython/issues/comments/405101894","html_url":"https://github.com/adafruit/circuitpython/issues/1029#issuecomment-405101894","issue_url":"https://api.github.com/repos/adafruit/circuitpython/issues/1029","id":405101894,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTEwMTg5NA==","user":{"login":"StephenHeathcote","id":37562777,"node_id":"MDQ6VXNlcjM3NTYyNzc3","avatar_url":"https://avatars2.githubusercontent.com/u/37562777?v=4","gravatar_id":"","url":"https://api.github.com/users/StephenHeathcote","html_url":"https://github.com/StephenHeathcote","followers_url":"https://api.github.com/users/StephenHeathcote/followers","following_url":"https://api.github.com/users/StephenHeathcote/following{/other_user}","gists_url":"https://api.github.com/users/StephenHeathcote/gists{/gist_id}","starred_url":"https://api.github.com/users/StephenHeathcote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephenHeathcote/subscriptions","organizations_url":"https://api.github.com/users/StephenHeathcote/orgs","repos_url":"https://api.github.com/users/StephenHeathcote/repos","events_url":"https://api.github.com/users/StephenHeathcote/events{/privacy}","received_events_url":"https://api.github.com/users/StephenHeathcote/received_events","type":"User","site_admin":false},"created_at":"2018-07-15T16:17:56Z","updated_at":"2018-07-15T16:17:56Z","author_association":"NONE","body":"Thanks for the response. \r\n\r\nI will take a look at ampy. I was Just trying to use the tools I have allready learned. I’ll let you know if I have any feature requests.\r\n\r\nI understand how to do the import to fix this in mpfshell. It’s a little trickier because mpfshell is building expressions as text strings on the host which it then passes to the target for execution. So I need to decide if it’s tidier to catch and handle the exception in the passed string or on the host. In any case if I can figure out how to do this properly I will see if the maintainer will accept the pull request.\r\n\r\nBut first I want to go play with circuit python on my new Huzzah. You guys do such cool stuff.\r\n"}}
{"actor":{"display_login":"StephenHeathcote"}}