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

Be more robust to corrupted installations on the RIO #117

Open
virtuald opened this issue Oct 4, 2024 · 0 comments
Open

Be more robust to corrupted installations on the RIO #117

virtuald opened this issue Oct 4, 2024 · 0 comments

Comments

@virtuald
Copy link
Member

virtuald commented Oct 4, 2024

In this CD thread (https://www.chiefdelphi.com/t/robotpy-deploy-error/472326) a user reported the following when running pip list on their rio:

python3 -m pip list
WARNING: Skipping /usr/local/lib/python3.12/site-packages/robotpy_hal-2024.3.2.1.dist-info due to invalid metadata entry 'name'
WARNING: Skipping /usr/local/lib/python3.12/site-packages/phoenix6-24.3.0.dist-info due to invalid metadata entry 'name'
Package              Version
-------------------- ----------
pip                  23.2.1
robotpy-cli          2024.0.0
robotpy-libgfortran5 12.1.0+r5
robotpy-openblas     0.3.24+r3
robotpy-wpimath      2024.3.2.1
robotpy-wpinet       2024.3.2.1
robotpy-wpiutil      2024.3.2.1
setuptools           75.1.0
typing_extensions    4.12.2
WARNING: Skipping /usr/local/lib/python3.12/site-packages/robotpy_hal-2024.3.2.1.dist-info due to invalid metadata entry 'name'
WARNING: Skipping /usr/local/lib/python3.12/site-packages/phoenix6-24.3.0.dist-info due to invalid metadata entry 'name'
WARNING: Skipping /usr/local/lib/python3.12/site-packages/robotpy_hal-2024.3.2.1.dist-info due to invalid metadata entry 'name'
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

Which caused the following to occur:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\stolb\AppData\Local\Programs\Python\Python312\Lib\site-packages\robotpy\__main__.py", line 4, in <module>
    main()
  File "C:\Users\stolb\AppData\Local\Programs\Python\Python312\Lib\site-packages\robotpy\main.py", line 314, in main
    retval = subcommand.run(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\stolb\AppData\Local\Programs\Python\Python312\Lib\site-packages\robotpy_installer\utils.py", line 188, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\stolb\AppData\Local\Programs\Python\Python312\Lib\site-packages\robotpy_installer\cli_deploy.py", line 249, in run
    self._ensure_requirements(
  File "C:\Users\stolb\AppData\Local\Programs\Python\Python312\Lib\site-packages\robotpy_installer\cli_deploy.py", line 390, in _ensure_requirements
    pkgdata = self._get_robot_packages(ssh)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\stolb\AppData\Local\Programs\Python\Python312\Lib\site-packages\robotpy_installer\cli_deploy.py", line 349, in _get_robot_packages
    self._robot_packages = pypackages.make_packages(rio_packages)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\stolb\AppData\Local\Programs\Python\Python312\Lib\site-packages\robotpy_installer\pypackages.py", line 198, in make_packages
    else [Version(v) for v in version]
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable

That seems bad. We should be more robust to this sort of thing, and maybe even detect it and suggest solutions to the user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant