-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] CircuitPython: Show Available Libraries results in 'Cannot read properties of undefined (reading 'name')' error #89
Comments
same here, have you find any clue about it? |
@alexlinde currently, we can just use CIRCUP to manage the bundle library until this get fixed. |
This just started happening to me too for all the library related commands I tried. |
Been happening here for a while, thought it was my fault, I did manually add non-standard micropython libraries.
|
I maybe found a solution! It seems that the LibraryManager tries to read all installed libraries and fails. So the So I tried two solutions to make this work again:
I don't know what the |
Move the custom libraries back and see if it still works. I'm messing with libraries and have it symlinked in, also containing other build folders like |
Yeah, I just restarted VS Code and the LibraryManager wouldn't work again... I just experimented some more. It seems that the But I don't see why the extension does that. Maybe it has to to with the |
I've had this problem repeatedly, from the first time I tried the extension. I've got a project I'm working on that really lends itself to CircuitPython and I really don't like the alternative editor choices, so I've spent some time recovering from Covid (again) trying to fix this - or, at the very least, understanding it and finding a workaround. I think I've succeeded in the second part. I'll need to get used to Typescript and extension authoring to do the first part (oh, and also the whole 'rona situation). The bug detectionWorking backwards from the error alert, "Cannot read properties of undefined (reading 'name')", we can deduce that something is trying to work with The constructor for The proper fixWhen I'm recovered, I'll do try and do this (unless some other hero wants a bash at it). I've been hacking around at the compiled javascript to make it work, and the proper fix needs to be done in the source typescript. I had a quick glance but need to be feeling better. The hacky fix
if (b) {
choices.push(new LibraryQP(b, p));
}
if (b && !this.workspaceLibraries.has(v)) {
choices.push(new LibraryQP(b, null));
}
Remember - this is only temporary. Any update to the extension will hose this directory, so hopefully the next upload will have fixes in it! |
I have the same error, and I running CircuitPython 8.0.0 beta 6 on a Raspberry Pi Pico W. |
Two separate issues. Well, one explanation, and one solved issue. The ._file does show up if a circuit python device is connected to my computer and I manually move a file/folder on OSX to the circuit python device. This is a Mac thing. OSX is adding "extend file attributes" on a fat32 like device that can't accept the extended attributes OSX wants. So, not really and issue. Delete if you want. The library issue is a bug. It is caused by using a file/library in the lib folder that is not in the Adafruit Circuit Python list of official libraries. In my case I was trying to use Bluepad32 which you can get from GitHub or the community download of libraries. When all the existing library files/folders are looped over, information is gleaned from the Adafruit repo about this library. However, like IrregularShed discovered, it is not found and is therefore undefined. I have a pull request that may or may not be merged that would fix this. It would display the library and version and indicate it is not undateable. |
Thank you @IrregularShed your hacky fix has worked for me. |
Was working when first installed. Uninstalled and reinstalled the CircuitPython extension, deleted the /Users/<>/Library/Application Support/Code/User/globalStorage/joedevivo.vscode-circuitpython folder for good measure. Running the 'Show Available Libraries' command always results in this error message
MacOS 12.3.1
VSCode 1.66.2
CircuitPython v0.1.17
The text was updated successfully, but these errors were encountered: