Couldn't connect to psychopy.org - first Psychopy use

OS: win10
PsychoPy version: v2024.2.4
**Standard Standalone? ** : yes
What are you trying to achieve?: I am a first time user and am trying to run demos and simple scripts to understand how Psychopy works.

What did you try to make it work?: I tried to run the colors.py demos in the Coder section but I received the following error message (my computer is connected to the internet so I don’t understand what went wrong):
522.7231 WARNING Couldn’t connect to psychopy.org
Check internet settings (and proxy setting in PsychoPy Preferences.

Running: C:\Program Files\PsychoPy\lib\site-packages\psychopy\demos\coder\understanding psychopy\colors.py

The experiment then ended with this:
File “C:\Program Files\PsychoPy\lib\site-packages\requests\adapters.py”, line 698, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host=‘fonts.googleapis.com’, port=443): Max retries exceeded with url: /css2?family=Helvetica+Bold&display=swap (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)’)))
36.0793 WARNING Monitor specification not found. Creating a temporary one…
################# Experiment ended with exit code 1 [pid:9572] #################

I simply downloaded Psychopy and installed it, is there anything else that need to be set up before running experiments?

After this I tried to run a simple routine following a youtube video, but again I get an error message:
Generating PsychoPy script…

Running: H:\PROJECTS_GIT\MA\verbal_memory_task\Psychopy\test1\test1_lastrun.py

4294.0399 INFO Loaded monitor calibration from [‘2025_01_23 09:53’]
4294.0736 INFO Loaded monitor calibration from [‘2025_01_23 09:53’]
Traceback (most recent call last):
File “H:\PROJECTS_GIT\MA\verbal_memory_task\Psychopy\test1\test1_lastrun.py”, line 976, in
win = setupWindow(expInfo=expInfo)
File “H:\PROJECTS_GIT\MA\verbal_memory_task\Psychopy\test1\test1_lastrun.py”, line 194, in setupWindow
win = visual.Window(
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\window.py”, line 433, in init
self.setColor(color, colorSpace=colorSpace, log=False)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\window.py”, line 2929, in setColor
self.color = color
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\window.py”, line 2911, in color
self._color = Color(value, self.colorSpace)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\colors.py”, line 272, in init
self.set(color=color, space=space)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\colors.py”, line 370, in set
setattr(self, space, color)
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\colors.py”, line 766, in hex
color = color.strip(‘#’)
AttributeError: ‘numpy.int32’ object has no attribute ‘strip’
Exception ignored in: <function Window.del at 0x000002AE598E7D90>
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\window.py”, line 665, in del
self.close()
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\visual\window.py”, line 2657, in close
self.backend.close() # moved here, dereferencing the window prevents
AttributeError: ‘NoneType’ object has no attribute ‘close’
################# Experiment ended with exit code 1 [pid:2008] #################

As I am working on a hospital computer, where there are special restrictions for security reasons, could this be due to the presence of firewalls or other inaccessibility issues?

Presumably you had sufficient admin rights to install PsychoPy in the first place.

Is it a Mac or a PC?

Have a look at section on testing the installation on my Primer slides here:

Yes, indeed, I have admin rights and the installation went well.
I am working on a computer, not a Mac. I have done the steps in the primer and everything works, but when I run the code I get the error.

What error message do you get for a Builder experiment with just a text component and a keyboard component?

At what point does it crash?

I dont’ know what happened but I opened a new file and followed the instructions in the primer and worked. It still says that it can’t connect to Psychotoolbox though, but at least now I can run a script.

WARNING Couldn’t connect to psychopy.org
Check internet settings (and proxy setting in PsychoPy Preferences.

Thanks and sorry for the disturb

Do you have a Pavlovia account? You probably haven’t signed into it from Builder yet.

I made one earlier and when I try to sign in from Builder it gives me this error, which I think is linked to the fact that I haven’t added the SSH key yet:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\connectionpool.py”, line 466, in _make_request
self._validate_conn(conn)
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\connectionpool.py”, line 1095, in _validate_conn
conn.connect()
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\connection.py”, line 730, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\connection.py”, line 909, in ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
File "C:\Program Files\PsychoPy\lib\site-packages\urllib3\util\ssl
.py", line 469, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
File "C:\Program Files\PsychoPy\lib\site-packages\urllib3\util\ssl
.py", line 513, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File “C:\Program Files\PsychoPy\lib\ssl.py”, line 513, in wrap_socket
return self.sslsocket_class._create(
File “C:\Program Files\PsychoPy\lib\ssl.py”, line 1071, in _create
self.do_handshake()
File “C:\Program Files\PsychoPy\lib\ssl.py”, line 1342, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\connectionpool.py”, line 789, in urlopen
response = self._make_request(
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\connectionpool.py”, line 490, in _make_request
raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\requests\adapters.py”, line 667, in send
resp = conn.urlopen(
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\connectionpool.py”, line 843, in urlopen
retries = retries.increment(
File “C:\Program Files\PsychoPy\lib\site-packages\urllib3\util\retry.py”, line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘gitlab.pavlovia.org’, port=443): Max retries exceeded with url: /oauth/token?client_id=944b87ee0e6b4f510881d6f6bc082f64c7bba17d305efdb829e6e0e7ed466b34&code=d8766cb31724a0ac331a793a6c57b0c5b7bb1736c3434fc177071b2eb8b5f47b&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fgitlab.pavlovia.org%2F&code_verifier=cNc8LRWhe0-IVXqI3pgudsDtw094CbZP9U_kF~A4VEJnvdkoX12.IEvWDoTzP-Nos4Dx4l.QYa3udvcB0vgCo-CTEh5PmaRGmeqO~-RHX0O (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)’)))

Are you connecting via a proxy server?

Yes, indeed. I will ask if the IT department can make an exception for Psychopy, otherwise I’ll try to install it on my personal laptop. Thank you!