Robotpy module not found

I installed all the packages for robotpy, but as I was downloading python for the roboRIO, I ran into the error “C:\Users\hinak\Desktop\FirstProgram22\FirstProgram22\Scripts\python.exe: No module named robotpy-installer”.

!

1 Like

Python modules called from the terminal have they’re hyphens replaced with underscores. So, you would use py -m robotpy_installer instead.

note: The 2022 version of robotpy has not yet been released.

1 Like

While trying to download python for the roboRIO using robotpy-installer, we ran into the error “urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)>”

!

I tried using the underscore instead, but still got the certificate error mentioned in my reply. I’m using 2021 to test our equipment. Thank you for the quick response.

Others have faced the SSL expired certificate problem (though not exactly the same as yours). Here’s a thread: https://www.chiefdelphi.com/t/expired-ssl-certificate/395329/6
Hope it helps

Thank for for the reply, but the solution in the thread doesn’t work for me. I will try to find the day that the certificate was still active.

Does it say what file it’s trying to download? The certificate for https://www.tortall.net/ is not expired, so it should work. Are you on a school network?

It’s trying to download a file called request.py. I was on a school network at the time. I also tried it on my personal network at home, but it gave me the same error.

Can you post the full out from the command, not just the screenshot that you posted? Thanks.

1 Like

Also, you might try upgrading certifi, since python will sometimes use that for certificates?

py -3 -m pip install -U certifi

If that fixes it, please let me know, and we can fix it for the next person who runs into it (tracking it at https://github.com/robotpy/robotpy-installer/issues/57).

1 Like

I upgraded my certifi then tried used the “py -3 -m robotpy_installer download-python” command again, but still got the same error. Here’s the full out from command.

What’s the output of py -3 -m pip list?

… It’ll be easier for everyone if you just copy/paste the text instead of taking a screenshot. You can surround the text with

```
text I want to show
```

So that it doesn’t reformat it

So sorry about that, I’m still new to the forum and the etiquette. Heres the output for pip list

PS C:\Users\hinak\Desktop\FirstProgram22> py -3 -m pip list
Package                  Version
------------------------ ----------
atomicwrites             1.4.0
attrs                    21.4.0
bcrypt                   3.2.0
certifi                  2021.10.8
cffi                     1.15.0
click                    8.0.3
colorama                 0.4.4
cryptography             36.0.1
iniconfig                1.1.1
packaging                21.3
paramiko                 2.9.2
Pint                     0.18
pip                      21.3.1
pluggy                   1.0.0
py                       1.11.0
pycparser                2.21
pyfrc                    2021.1.2
PyNaCl                   1.5.0
pynetconsole             2.0.2
pynetworktables          2021.0.0
pyntcore                 2021.3.1.0
pyparsing                3.0.6
pytest                   6.2.5
robotpy                  2021.2.9
robotpy-hal              2021.3.1.0
robotpy-halsim-gui       2021.3.1.0
robotpy-installer        2021.0.3
robotpy-wpilib-utilities 2021.0.1
robotpy-wpimath          2021.3.1.0
robotpy-wpiutil          2021.3.1.0
setuptools               58.1.0
six                      1.16.0
toml                     0.10.2
wpilib                   2021.3.1.0

Heh, looks fine to me, this is quite weird. It’s likely that the Let’s Encrypt root certificate hasn’t been updated on your system for some reason… though I thought python used certifi by default now?

I don’t use Windows at all these days, but according to this SO post maybe try browsing to https://www.tortall.net to get the certificate in your certificate cache and then try again?

Another thing you might check is to see if you have the latest version of Python 3.9 installed? It should be 3.9.9? I’m not optimistic that would solve your issue.

Thank you for the reply, I am using the latest python version 3.9.9. I’m quite new to programming so I’m not too sure on how to get the certificate into my certificate cache. Could you perhaps point me to a resource on how to do so?

Well, that’s not really a programming thing per se, it’s one of those things that should ‘just work’.

Does browsing to https://www.tortall.net on your Microsoft browser (IE, Edge) have a certificate error also? I’m not sure if other browsers use the system certificate store or not.

… for giggles, if you previously used a non-microsoft browser to go to tortall.net, then try running the robotpy-installer command again.

I just spun up a WIndows 10 VM, installed Python 3.9.9, and was able to duplicate your error.

I then browsed to tortall.net using Microsoft Edge, and the error went away. Does that work for you too?

It doesn’t work for me. Although I was able to browse tortall.net Microsoft Edge, I still received the expired certificate error after trying again.

Are you sure that you browsed to the https version? Tortall serves both secure and insecure pages.