Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] MovieStim and Psycho backend problem

edited March 2013 in OpenSesame

I have to display a video file in an experiment builded in Psycho. Since the media_player_vlc plug-in does not work on Psycho, I'm trying to display the movie by the PsychoPy commands. However, something goes wrong. This simple code:

from psychopy import visual

mov = visual.MovieStim(exp.window, 'C:/Users/Andrea/Desktop/Movie.avi')
mov.draw()
exp.window.flip()

produces the following error:

In: inline_script (prepare phase)
File "dist\psychopy\visual.py", line 3816, in __init__

Python traceback:
AttributeError: 'NoneType' object has no attribute 'width'

and in the debug window:

File "dist\libopensesame\inline_script.py", line 111, in prepare
File "<string>", line 3, in <module>
File "dist\psychopy\visual.py", line 3816, in __init__
AttributeError: 'NoneType' object has no attribute 'width'

I use a PC with Windows 7 64 bit. From the PsychoPy group I read that avbin.dll generates some problems on 64 bit Windows machines, but as far as I know this problem should be solved now.

Any suggestion?

Thanks.

Andrea

Comments

  • edited March 2013

    Hi Andrea,

    Your code is fine. It works for me with PsychoPy 1.76.00 on Kubuntu 12.04.

    From the PsychoPy group I read that avbin.dll generates some problems on 64 bit Windows machines, but as far as I know this problem should be solved now.

    From the error, it seems as though there is simply a bug somewhere in PsychoPy, not something related to avbin.dll (I think that would result in hard crashes, but I'm not a 100% sure). What version of PsychoPy do you use? In OpenSesame you can check this by typing modules() in the debug window. If you are up-to-date and still get this error, it might be worthwhile posting it on the PsychoPy mailing list.

    Edit: It could also be that PsychoPy cannot find the file, or that it cannot handle the video format. It's quite often in PsychoPy that crashes are not dealt with gracefully and result in uninformative error messages.

    Cheers!

    Sebastiaan

  • edited 9:15PM

    Hi Sebastiaan. You were right, the problem was due to something in the video format. It sounds strange, because my initial video was an uncompressed AVI. I re-created a compressed video and now it works.

    Btw, in order to make my initial code funcioning, it has to be added a loop, so:

    from psychopy import visual
    
    mov = visual.MovieStim(exp.window, 'C:/Users/Andrea/Desktop/Movie.avi')
    while mov.status != visual.FINISHED:
        mov.draw()
        exp.window.flip()
    

    Cheers,

    Andrea

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games