Howdy, Stranger!

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

Supported by

no mongoengine or version 3.2

Hello,

I was trying to execute a preexisting experiment on a new Windows PC, but when using the new version 3.3.9 the launch crashes when OpenSesame tries to install mongoengine (which turns into error while executing inline script).

The version which we know is compatible with the experiment is version 3.2. However, when I try to download it through the respective channel, I get the new version instead (3.3.9 again).

Can you help me please, either by pointing out the bugfix with the mongoengine (which it says is not installed, even in the megapack installer), or by indicating the 3.2 download path?

Many thanks in advance,

Jonas

Comments

  • here the same error message after trying several times:


    • Error while executing inline script

    Details

    • item: install_missing_modules
    • phase: prepare
    • item-stack: SessionSettings[run].Experiment[prepare].install_missing_modules[prepare]
    • time: Tue Aug 31 12:56:34 2021
    • exception type: ModuleNotFoundError
    • exception message: No module named 'mongoengine'

    Traceback (also in debug window)

      Inline script, line 37, in check_install
      File "C:\Program Files (x86)\OpenSesame\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "
    


  • Hi @jonas ,

    My guess is that mongoengine fails to install (and therefore later fails to be imported), but that can happen for any number of reasons. Could you post the actual script and the full output from the console? There's probably another error in there related to the failed installation.

    — Sebastiaan

  • edited September 2021

    Great, thanks a lot @sebastiaan !

    I think this is the script you mean, called "install_missing_modules":

    ----

    import sysimport importlib


    check_modules = ['mongoengine','faker','selenium']

    if sys.platform == 'win32':

    check_modules += [('win32gui','pywin32')]


    print("Checking for missing modules")

    try:

    import pip

    pip_cmd = pip.main

    except:

    import pip._internal

    pip_cmd = pip._internal.main


    cnvs = Canvas()

    cnvs.text("Installing required modules. Please wait...", y=-40)

    modules = []


    def update_status():

    c = Canvas()

    c.copy(cnvs)

    offset = 0

    for msg in modules:

    c.text(msg, y=offset)

    offset += 40

    c.show()


    def check_install(mod_name):

    if type(mod_name) is tuple:

    import_lib = mod_name[0]

    lib_name = mod_name[1]

    else:

    import_lib = lib_name = mod_name


    try:

    return importlib.import_module(import_lib)

    except ImportError:

    modules.append("Installing {}".format(lib_name))

    print('Could not import {}, attempting to install'.format(lib_name))

    update_status()

    pip_cmd(['install', lib_name])

    modules[-1] = "Installed {}".format(lib_name)

    return importlib.import_module(import_lib)


    for module in check_modules:

    lib_name = (type(module) is tuple and module[0]) or module

    vars()[lib_name] = check_install(module)

  • And here again the error message (not sure what went wrong copy-pasting it earlier, sorry):

    • Error while executing inline script

    Details

    • item: install_missing_modules
    • phase: prepare
    • item-stack: SessionSettings[run].Experiment[prepare].install_missing_modules[prepare]
    • time: Fri Sep 3 17:04:06 2021
    • exception type: ModuleNotFoundError
    • exception message: No module named 'mongoengine'

    Traceback (also in debug window)

      Inline script, line 37, in check_install
      File "C:\Program Files (x86)\OpenSesame\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'mongoengine'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\inline_script.py", line 92, in prepare
        self.workspace._exec(self.cprepare)
      File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\base_python_workspace.py", line 124, in _exec
        exec(bytecode, self._globals)
      Inline script, line 48, in <module>
      Inline script, line 44, in check_install
      File "C:\Program Files (x86)\OpenSesame\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'mongoengine'
    


  • Hi @jonas ,

    Can you also post the output from the console? The error message (Traceback) only contains a description of the direct cause of the crash. However, I suspect that before this happens, at the point where the script tries to install the missing modules, there will also be output indicating what went wrong there. And this output should be in the console, before the error message that you've posted now.

    -- Sebastiaan

  • edited September 2021

    hi again @sebastiaan ,

    sorry for the long delay. Now I finally managed to try again and locate the console output.

    please let me know if this gives clearer hints.

    cheers, jonas


    Jupyter QtConsole 4.6.0
    Python 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 21:48:41) [MSC v.1916 64 bit (AMD64)]
    Type 'copyright', 'credits' or 'license' for more information
    IPython 7.12.0 -- An enhanced Interactive Python. Type '?' for help.
    
    [2021-09-22 12:01:47,645:process:153:INFO] Starting experiment as ExperimentProcess-3
    pygame 1.9.6
    Hello from the pygame community. https://www.pygame.org/contribute.html
    [2021-09-22 12:01:48,583:legacy:187:INFO] enabling hardware surface
    [2021-09-22 12:01:48,583:legacy:196:INFO] enabling double buffering
    [2021-09-22 12:01:48,584:legacy:200:INFO] video mode ok
    [2021-09-22 12:01:48,851:legacy:185:INFO] sampling freq = 48000, buffer size = 1024
    [2021-09-22 12:01:48,851:legacy:188:WARNING] mixer already initialized, closing
    [2021-09-22 12:01:49,588:experiment:464:INFO] experiment started
    [2021-09-22 12:01:49,588:experiment:468:INFO] disabling garbage collection
    Checking for missing modules
    Could not import mongoengine, attempting to install
    WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
    Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
    To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
    ERROR: Exception:
    Traceback (most recent call last):
     File "<string>", line 38, in check_install
     File "C:\Program Files (x86)\OpenSesame\lib\importlib\__init__.py", line 127, in import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
     File "<frozen importlib._bootstrap>", line 983, in _find_and_load
     File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'mongoengine'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
       status = self.run(options, args)
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pip\_internal\commands\install.py", line 258, in run
       isolated_mode=options.isolated_mode,
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pip\_internal\commands\install.py", line 604, in decide_user_install
       if site_packages_writable(root=root_path, isolated=isolated_mode):
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pip\_internal\commands\install.py", line 549, in site_packages_writable
       test_writable_dir(d) for d in set(get_lib_location_guesses(**kwargs))
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pip\_internal\commands\install.py", line 549, in <genexpr>
       test_writable_dir(d) for d in set(get_lib_location_guesses(**kwargs))
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pip\_internal\utils\filesystem.py", line 140, in test_writable_dir
       return _test_writable_dir_win(path)
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\pip\_internal\utils\filesystem.py", line 153, in _test_writable_dir_win
       fd = os.open(file, os.O_RDWR | os.O_CREAT | os.O_EXCL)
    PermissionError: [Errno 13] Permission denied: 'C:\\Program Files (x86)\\OpenSesame\\Lib\\site-packages\\accesstest_deleteme_fishfingers_custard_b9knt3'
    [2021-09-22 12:01:54,929:experiment:552:INFO] enabling garbage collection
    
    Error while executing inline script
    
    item: install_missing_modules
    phase: prepare
    item-stack: SessionSettings[run].Experiment[prepare].install_missing_modules[prepare]
    time: Wed Sep 22 12:01:54 2021
    exception type: ModuleNotFoundError
    exception message: No module named 'mongoengine'
    
    Traceback:
     Inline script, line 37, in check_install
     File "C:\Program Files (x86)\OpenSesame\lib\importlib\__init__.py", line 127, in import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
     File "<frozen importlib._bootstrap>", line 983, in _find_and_load
     File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'mongoengine'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\inline_script.py", line 92, in prepare
       self.workspace._exec(self.cprepare)
     File "C:\Program Files (x86)\OpenSesame\Lib\site-packages\libopensesame\base_python_workspace.py", line 124, in _exec
       exec(bytecode, self._globals)
     Inline script, line 48, in <module>
     Inline script, line 44, in check_install
     File "C:\Program Files (x86)\OpenSesame\lib\importlib\__init__.py", line 127, in import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
     File "<frozen importlib._bootstrap>", line 983, in _find_and_load
     File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'mongoengine'
    


  • Hi @jonas ,

    I think it's a permissions issue: you need to run OpenSesame as administrator so that the package can be installed.

    — Sebastiaan

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