psychopy.org | Reference | Downloads | Github

Crashes when running through command line

OS: Win10 x64
PsychoPy version : 2020.1.3
Standard Standalone? (y/n) y

When I run the app I wrote through PyCharm, everything runs fine, but when I try to run through Powershell/cmd (I am indeed running with the interpreter provided in the standalone package) ‘the splash screen appears and then goes away’ (solutions from the ‘troubleshooting’ page did not help). Running with ‘-v’ gives the following output:

.\python64.exe : import _frozen_importlib # frozen
At line:1 char:1
+ .\python64.exe 2> my.txt -v A:\PycharmProjects\PsychLabProject\psycho ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (import _frozen_importlib # frozen:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
import _imp # builtin
import sys # builtin

import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>


import '_thread' # <class '_frozen_importlib.BuiltinImporter'>

import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>

import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>

and so on.

Any suggestions? What’s the difference between running python in Pycharm and in a command line?

Edit: apparently the ‘NativeCommandError’ is unrelated to the crash of PsychoPy, but this obviously doesn’t solve my problem of the crash. It would help if anyone has a tip on how to detect the error besides running python.exe -v.

Command I run is A:\PsychoPy\python.exe A:/PycharmProjects/PsychLabProject/psycholab.py - works as expected in Pycharm terminal, but not in Powershell (incl. x86 and ISE) or cmd.

Still relevant.