Skip to main content

Psychopy builder running silently but not working

 Recently I started to use the psychopy builder version in linux ubuntu version 18.04. After learning how to use psychopy as a python library, I needed to use it as a software with builder version. Now after writing the builder test, when I tried to run it, it didn't run without any error.I went through a painstaking procedure to solve this and that's why I am writing this post about how I solved it. Enough of prologue, let's dig in to the solutions possible.


Solution no 1:

One of the reason this issue occur is that the psychopy builder version gets confused with the graphic cards. The solution of this issue is in details and variations mentioned in this github issue thread. But if you want to avoid going through it, here is the solution mentioned there:

First of all, search for /etc/X11/xorg.conf.d/20-intel.conf

Now if you have this file, then that is good. Put this following content inside the file. 

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
EndSection

 Then save and restart your machine. That should solve this problem properly. Now, there are a few hiccups possibly in this road. 

If you search for the above file, then this file may not be present in your pc; just like it was not in mine. In that case, if you need, you have to create the directory using mkdir xorg-conf.d command. This will create the directory. After that, you will have to open the file using 

sudo vi 20-intel.conf and then enter the same content as above; finally saving it by writing :wq! 

Now, it is possible that the problem still continues even after doing this. In such a case, it maybe is a ramp related issue; or something else.

Let's check if it is a ramp problem first. In case of ramp, it is a pyglet and psychopy clash. In such a case, find psychopy/psychopy/visual/backends/gamma.py and hardcode the rampsize to be 1024 instead of 0. 

If you don't have that or even if you do rampsize correction you can't solve it; then you have to uninstall psychtoolbox.

In such a case, the python crashes as total and a GC object detected twice error occurs. In such a case, the keyboard object creates the problem as the keyboard fetches psychtoolbox and psychopy both calls the python garbage caller. While all this is complicated, the solution is very simple though. 

Just uninstall the psychtoolbox i.e.

pip3 uninstall psychtoolbox

Now this solved the problem for me; and if this is not the end point for you, comment below and let's see your code to solve the new issue. 

Thanks for reading and I am glad if I could help you!

Comments

Popular posts from this blog

Tinder bio generation with OpenAI GPT-3 API

Introduction: Recently I got access to OpenAI API beta. After a few simple experiments, I set on creating a simple test project. In this project, I will try to create good tinder bio for a specific person.  The abc of openai API playground: In the OpenAI API playground, you get a prompt, and then you can write instructions or specific text to trigger a response from the gpt-3 models. There are also a number of preset templates which loads a specific kind of prompt and let's you generate pre-prepared results. What are the models available? There are 4 models which are stable. These are: (1) curie (2) babbage (3) ada (4) da-vinci da-vinci is the strongest of them all and can perform all downstream tasks which other models can do. There are 2 other new models which openai introduced this year (2021) named da-vinci-instruct-beta and curie-instruct-beta. These instruction models are specifically built for taking in instructions. As OpenAI blog explains and also you will see in our

Can we write codes automatically with GPT-3?

 Introduction: OpenAI created and released the first versions of GPT-3 back in 2021 beginning. We wrote a few text generation articles that time and tested how to create tinder bio using GPT-3 . If you are interested to know more on what is GPT-3 or what is openai, how the server look, then read the tinder bio article. In this article, we will explore Code generation with OpenAI models.  It has been noted already in multiple blogs and exploration work, that GPT-3 can even solve leetcode problems. We will try to explore how good the OpenAI model can "code" and whether prompt tuning will improve or change those performances. Basic coding: We will try to see a few data structure coding performance by GPT-3. (a) Merge sort with python:  First with 200 words limit, it couldn't complete the Write sample code for merge sort in python.   def merge(arr, l, m, r):     n1 = m - l + 1     n2 = r- m       # create temp arrays     L = [0] * (n1)     R = [0] * (n

What is Bort?

 Introduction: Bort, is the new and more optimized version of BERT; which came out this october from amazon science. I came to know about it today while parsing amazon science's news on facebook about bort. So Bort is the newest addition to the long list of great LM models with extra-ordinary achievements.  Why is Bort important? Bort, is a model of 5.5% effective and 16% total size of the original BERT model; and is 20x faster than BERT, while being able to surpass the BERT model in 20 out of 23 tasks; to quote the abstract of the paper,  ' it obtains performance improvements of between 0 . 3% and 31%, absolute, with respect to BERT-large, on multiple public natural language understanding (NLU) benchmarks. ' So what made this achievement possible? The main idea behind creation of Bort is to go beyond the shallow depth of weight pruning, connection deletion or merely factoring the NN into different matrix factorizations and thus distilling it. While methods like knowle