Howdy, Stranger!

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

Supported by

OSError: [Errno 13] occurs in the inline_script using Xpyriment & Pygaze

Hello,

I'm faced with weird problem of OSerror when I run the eye tracking experiment by the inline_script.
The error is as below.

File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/inline_script.py", line 102, in run
    self.experiment.python_workspace._exec(self.crun)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/python_workspace.py", line 161, in _exec
    exec(bytecode, self._globals)
  File "<string>", line 123, in <module>
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/expyriment/control/_experiment_control.py", line 164, in start
    experiment._data = DataFile(additional_suffix=experiment.filename_suffix)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/expyriment/io/_files.py", line 346, in __init__
    OutputFile.__init__(self, suffix, directory, time_stamp=time_stamp)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/expyriment/io/_files.py", line 170, in __init__    
    os.mkdir(directory)
OSError: [Errno 13] Permission denied: 'data'

I made the script by Xpyriment and Pygaze, and copied it into the inline_script of Opensesame (3.1.6) on MacPC.

On the other hand, it runs partway of program on another version of Opensesame (3.0.7). In this case, the experiment runs correctly by the end of first block. From the second block of experiment, the procedure becomes wrong (e.g., the fixation mark becomes a black box, the stimuli are presented in the blank screen which doesn't have any stimuli originally...)

I have attached my program. Note that some codes are omitted for the clear understanding.

Thanks in advance!

Comments

  • It looks like you are trying to create a folder, while your user has no write permissions (I'm assuming you are on a unix like system. Mac, right?). Just create a folder called 'data' if that's where your log will be saved (I didn't see this in your script).
    I ran it on a win 10 and got this:

        Traceback:
          File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\inline_script.py", line 102, in run
            self.experiment.python_workspace._exec(self.crun)
          File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\python_workspace.py", line 161, in _exec
            exec(bytecode, self._globals)
          File "<string>", line 24, in <module>
        NameError: name 'listAll' is not defined
    

    'listAll' is not defined in your script (maybe it is in the omitted part).

  • Hi hike,

    It shows the same error even though I created the 'data' folder in Contents\Resources. In Opensesame ver 3.1, there is no data folder in Contents\Resources while there is in ver 3.0. That's why I created the data folder in the location.

    Any other locations I have to check?

  • I think you need a data folder in folder where your experiment file is located. (I didn't find any data folder on windows machine.) The line 169 and 170 from _files.py check if the path where you are running from is a directory and creates one (perhaps temporarily, not sure)
    if not os.path.isdir(directory):
    os.mkdir(directory)

    Where are you running the experiment from? Try putting the experiment file in a folder, say on desktop, and run from there.

    I would also make sure that your user has sufficient permissions. I don't have a mac around to check this, but here is link to start --> http://superuser.com/questions/590683/how-do-i-find-my-user-id-and-group-in-mac-os-x

    Maybe, someone can test your experiment on a mac?

  • I just tested on a mac. I don't have any data folder in Contents\Resources, and got the same error about listAll
    NameError: name 'listAll' is not defined
    I think you have permissions error as I said earlier.

  • It still has shown the same error even though I created the data folder where the experiment file is and also had permissions by sudo open /Applications/OpenSesame.app (https://support.apple.com/en-us/HT204012).
    In the case of permission, I cannot start OpenSesame in the first place.

    As I mentioned, this error hasn't occurred on the another Opensesame version (3.0) while there is the different error.

    Do you have any ideas?

  • No other ideas!

    It seems that the problem is with your computer not with opensesame. I ran it on a mac and it worked.

    You need to fix your computer. Try fresh install or something.

    Btw, enabling root on unix systems in not a good idea.

  • Could you explain how I can get a sufficient permission?
    I'm not really sure what to do from the link you gave me.
    Thanks!

  • I assume this is your computer and you've installed the operating system on it, created a user and set a password, right?

    The link explains how to find out your user's permissions. I am not around a mac at the moment, but you and I can type command 'id' and see if the outputs are similar or you are missing something.

  • Yes, it is my PC that has an user with password, but MacOS (Yosemite) was pre installed as you know.
    When I entered "id" in terminal, I can see the same list as that of link you gave me.

    I'm not familiar with this, but what should I check and do from this?

    Thanks!

  • rrrrrr
    edited February 2017

    HI,

    I modified the OSerror by having the permission to OpenSesame, but another error has happened as below.
    ****Sorry, the OSerror has happened again.


    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/inline_script.py", line 102, in run
        self.experiment.python_workspace._exec(self.crun)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/python_workspace.py", line 161, in _exec
        exec(bytecode, self._globals)
      File "<string>", line 100, in <module>
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/pygaze/logfile.py", line 37, in __init__
        self.__class__.__init__(self, **args)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/pygaze/_logfile/logfile.py", line 53, in __init__
        self.logfile = open(self.filename, "w")
    IOError: [Errno 13] Permission denied: 'default.txt'
    

    I've already had a permission on the pygaze/_logfile/logfile.py in the same way, but it's still showed the same error.

    What the different cause of this error?

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