Skip to content
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] Problem with the bundle download and unpacking #149

Open
wmerkens opened this issue May 29, 2024 · 0 comments
Open

[BUG] Problem with the bundle download and unpacking #149

wmerkens opened this issue May 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wmerkens
Copy link

Describe the bug
When the ext downloads the latest bundle and unpacks it, the files get corrupted. I tested it on three different running Linux os, two on hardware and one in a VM. Also checked in Windows 10 running VSC.

Example:

From linux $HOME/.config/Code/User/globalStorage/joedevivo.vscode-circuitpython/bundle/20240529/
Look at the __init__.py file, look at the top of the file.

Bad

            "{} MUST override '_set_line_spacing'".format(type(self))
        )

    @line_spacing.setter
    def line_spacing(self, new_line_spacing: float) -> None:
        self._set_line_spacing(new_line_spacing)

    @property
    def label_direction(self) -> str:
        """Set the text direction of the label"""
        return self._label_direction

Good

# SPDX-FileCopyrightText: 2020 Tim C, 2021 Jeff Epler for Adafruit Industries
#
# SPDX-License-Identifier: MIT

"""
`adafruit_display_text`
=======================
"""

__version__ = "3.1.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Display_Text.git"

from displayio import Group, Palette

We can see the top of the files is missing so when VSC Intelcode/intelsense tries to use it a error from pylint comes back and says for example

from adafruit_display_text import label

syntax error line 1 of that import which is incorrect because the code works fine.

This problem is also in 0.1.20 and 0.2.0 of the ext.

To Reproduce
Steps to reproduce the behavior:

  1. Install the ext and hook up a MCU ( or a folder with code.py ) to sastify the ext so it triggers.
  2. Add the lib adafruit_display_text ( I tested with the ext lib installer and circup )
  3. Then just do that import I referred to, from adafruit_display_text import label
  4. Or just go to the bundles directory and open that lib and the __init__.py, it should show it truncated at the top.
  5. See error

Expected behavior
It should have no errors from pylint.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux KDE and Windows
  • Version KDE 22.04 and Windows 10

Additional context
I believe this issue has been here for a while, I have looked back at one desktop where I had not updated for 4 months and the error was there.

To get around the problem, I downloaded the bundle myself and then unpacked it to where it goes.

@wmerkens wmerkens added the bug Something isn't working label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant