Closed VirtualWolf closed 1 year ago
I am having pretty much exactly the same issue as this
EDIT: This has been fixed in the upcoming patch. Would love to hear your feedback if you want to try it. You can find it here.
ORIGINAL: Please let me know if this fixes your issue https://github.com/pycom/pymakr-vsc/issues/242#issuecomment-1140751462.
Please let me know if this fixes your issue https://github.com/pycom/pymakr-vsc/issues/242#issuecomment-1140751462.
Yeah I tried that, no dice I'm afraid!
This has been fixed in the upcoming patch. Would love to hear your feedback if you want to try it. You can find it here.
I just updated to 2.15.0 but it hasn't changed anything there unfortunately. Still absolutely nothing happens when clicking the Sync Project button, and there's nothing in the debug logs in the developer console either.
Is there any extra debug logging that could be added? I'm happy to poke around and gather whatever info would be helpful for you! Pymakr 1.x was fantastic and I'd love to help get 2.x working like 1.x did. 🙂
I'm happy to poke around and gather whatever info would be helpful for you
That would be much appreciated.
You can increase debugging level in settings:
Also, the Output tab might contain more information
And in your settings, do you have an entry like this?
"pymakr.devices.configs": [
{
"autoConnect": "lastState",
"name": "",
"username": "micro",
"password": "python",
"hidden": false,
"rootPath": "/flash",
"id": "Py73bb20"
},
{
"autoConnect": "lastState",
"name": "",
"username": "micro",
"password": "python",
"hidden": false,
"rootPath": "/flash",
"id": "Py3baa06"
}
]
If so, could you please copy paste it to here.
Ah yeah, the debug setting is something I stumbled onto in another issue, that's what I've had turned on with all those screenshots in my initial issue. 😄
I hadn't seen the Output tab before, but it's displaying all the same stuff that the developer console does anyway.
As for the settings.json, yep, it's set like this:
"pymakr.devices.config": [
{
"match": "manufacturer=.*",
"field": "rootPath",
"value": "/"
}
],
If I change pymakr.devices.config
add an s
at the end like in your example, it just says it's an unknown setting.
Can you try Pymakr 2.15.x and see if that fixes it?
Slightly more progress with 2.15.0 in that I get this in the Output tab:
debug: PyMakr (26037) > Device: tty.usbmodem1234561 > busy...
But nothing else. Weirdly, when I clicked the Disconnect icon, at that point I got a little VSCode dialog thing popping up saying it was uploading:
Did the update populate your pymakr.devices.config
?
Yup! It's exactly as pasted in my comment yesterday. 🙂
Sorry. I meant pymakr.devices.configs
. 2.15.0
should create a new entry.
Hm, no, it doesn't recognise configs
with an s
on the end. I deleted all of the pymakr.*
entries from settings.json
and uninstalled 2.15.0 entirely then reinstalled, and the default examples it recreates are under pymakr.devices.config
, and if I change it to configs
it's not recognised as an option:
Does anyone have an alternative extension or environment for MicroPython on M1? We have a project on hold here with no functional IDE.
No connection to devices, no terminal session to the devices.
The terminal process "node '/Users/xxx/.vscode/extensions/pycom.pymakr-preview-2.16.4/src/terminal/bin/client.js'" failed to launch (exit code: 1).
REPL is operational using screen, device is working just fine. No means in which to upload files, virtually no PyMakr options in VS Code. NodeJS is latest LTS and working.
This is some serious breaking change from older versions of PyMakr!
@rand12345 you can still install v1.
@VirtualWolf there was a bug in a dependency that didn't manifest itself in my local environment. I applied a fix, but I don't have any 3rd party devices to test it with. You can try it in v2.16.4
.
I'm afraid it's gone backwards now. 😂 I can't connect at all even after resetting the device, and when clicking the button to open the terminal window, I get The terminal process failed to launch: Path to shell executable "node" does not exist.
Actually Ignore that, turns out it was VSCode itself being weird and a quit and reopen sorted that part out.
Unfortunately I can't actually get it to connect at all (or recognise me clicking disconnect) anymore even after doing the reset dance. When I click the Connect button, the debug logs show this:
[Extension Host] debug: PyMakr (12251) > Device: tty.usbmodem1234561 > busy...
workbench.desktop.main.js:71 [Extension Host] info: PyMakr (12252) > Device: tty.usbmodem1234561 > connecting to "tty.usbmodem1234561"...
workbench.desktop.main.js:71 [Extension Host] info: PyMakr (12292) > Device: tty.usbmodem1234561 > Connected.
workbench.desktop.main.js:71 [Extension Host] info: PyMakr (12292) > Device: tty.usbmodem1234561 > Waiting for access...
And I get a popup from the extension:
But that's it. No more response when clicking the disconnect button in the Projects window either (clicking "Restart in safe mode" doesn't work, it eventually times out and says to reset it from the board itself).
One thing I did notice is that the "Output" panel has an option not just for Pymakr, but also the specific device. Is it possible that that's interfering with things, like it's grabbing the connection first and blocking the rest of the extension functionality from working?
Thanks for the update @VirtualWolf .
What version are you currently on and would it be possible for us to have a remote session over Discord? My ID is 402846333087776768
As for the the output panel. It just logs the data, it's not able to hijack it.
UPDATE: After a session with @VirtualWolf it seems that some 3rd party devices do not work with the micropython-ctl
package. The REPL is not detected correctly, leaving the device in a busy state.
I'll provide a follow up when we have more info or a fix.
We did some more testing and it seems like the root of the problem was the default chunk size and delay between sending chunks that the micropython-ctl
library that Pymakr relies on uses. Pymakr 2.18.2 has two new settings you can configure in pymakr.devices.configs
for your devices, and the following worked for me with an Unexpected Maker FeatherS2:
"pymakr.devices.configs": [
{
"autoConnect": "onLostConnection",
"name": "FeatherS2",
"adapterOptions": {
"chunkDelay": 20,
"chunkSize": 256
},
"rootPath": "/",
"id": "123456"
}
]
do you know what are the defaults are?
If I remember correctly they're 3000 and 0 for size and delay.
I assume this was fixed with the added adapterOptions
. If not we can reopen it.
Ah sorry. Yes indeed, everything's working a treat now, thanks!
Hi, I have the same problem with an esp8266, and because I'm new in this world, I have no idea on where or how to put those codes. Can anyone help me? My discord id is davionga#1156
Hi, I have the same problem with an esp8266, and because I'm new in this world, I have no idea on where or how to put those codes. Can anyone help me? My discord id is davionga#1156
best to create a new issue on this repo , if you want to save typing link to this one.
Describe the bug
I'm able to get Pymakr to connect to my board and bring up a REPL window (though every time I disconnect or reconnect I have to press the Reset button on the board to get it to connect), but clicking the little Sync Project button does nothing whatsoever.
Steps to reproduce
This is starting from total scratch.
tty.usbmodem1234561 / unknown seems to be busy. Do you wish restart it in safe mode?
Clicking the "Restart in safe mode" button does nothing, but manually pressing the reset button on the board itself then causes the terminal window to connect and I'm now at the REPL which works:main.py
and click the "Sync project" button:Expected behavior
The project is uploaded and I can see the "Hello world" constantly being printed out every second in the terminal.
Actual behaviour
Absolutely nothing happens, even when looking in the developer console with Pymakr's logs set to
debug
level.Environment
Additional context
I came across #242 and have updated the root path setting to be set to
/
for everything (I don't have any devices that don't have the root path at/
):But that hasn't made any difference unfortunately.
During step 3 when I initially click the lightning icon to connect but it never finishes, the debug logs show this:
Then upon pressing the reset button on the board:
But the Sync Project and and Download Project buttons do nothing. As well, the "Open device in file explorer" button briefly pops up a little thing at the bottom right saying "Adding device to explorer" and this shows in the debug logs:
But nothing else, I'm not entirely clear on what it's meant to do... :)