rkimoakbioinformatics / oakvar

Genomic variant analysis platform
Other
32 stars 8 forks source link

NameError: name 'stage_handler' is not defined #8

Closed antonkulaga closed 2 years ago

antonkulaga commented 2 years ago

I am constantly getting NameError: name 'stage_handler' is not defined when I install apps. Did not notice what exactly it crashes but it is annoying to see it in logs

ov gui

  ______             __        __     __                    
 /      \           /  |      /  |   /  |                   
/$$$$$$  |  ______  $$ |   __ $$ |   $$ | ______    ______  
$$ |  $$ | /      \ $$ |  /  |$$ |   $$ |/      \  /      \ 
$$ |  $$ | $$$$$$  |$$ |_/$$/ $$  \ /$$/ $$$$$$  |/$$$$$$  |
$$ |  $$ | /    $$ |$$   $$<   $$  /$$/  /    $$ |$$ |  $$/ 
$$ \__$$ |/$$$$$$$ |$$$$$$  \   $$ $$/  /$$$$$$$ |$$ |      
$$    $$/ $$    $$ |$$ | $$  |   $$$/   $$    $$ |$$ |      
 $$$$$$/   $$$$$$$/ $$/   $$/     $/     $$$$$$$/ $$/       

OakVar Server is served at 0.0.0.0:8080
(To quit: Press Ctrl-C or Ctrl-Break if run on a Terminal or Windows, or click "Cancel" and then "Quit" if run through OakVar app on Mac OS)
Gtk-Message: 00:55:40.492: Failed to load module "xapp-gtk3-module"
Gtk-Message: 00:55:40.493: Failed to load module "appmenu-gtk-module"
Gtk-Message: 00:55:40.530: Failed to load module "canberra-gtk-module"
Gtk-Message: 00:55:40.530: Failed to load module "canberra-gtk-module"
Stub sandbox ignoring command: /app/extra/nacl_helper
[2:2:0731/005540.659736:ERROR:nacl_fork_delegate_linux.cc(311)] Bad NaCl helper startup ack (0 bytes)
Gtk-Message: 00:55:40.875: Failed to load module "xapp-gtk3-module"
Gtk-Message: 00:55:40.875: Failed to load module "appmenu-gtk-module"
Gtk-Message: 00:55:40.915: Failed to load module "canberra-gtk-module"
Gtk-Message: 00:55:40.915: Failed to load module "canberra-gtk-module"
Opening in existing browser session.
Traceback (most recent call last):
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/webstore/webstore.py", line 89, in fetch_install_queue
    install_module(
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/module/__init__.py", line 498, in install_module
    raise e
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/module/__init__.py", line 437, in install_module
    set_stage_handler(args=args)
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/module/__init__.py", line 275, in set_stage_handler
    args["install_state"] = stage_handler.install_state  # type: ignore
NameError: name 'stage_handler' is not defined
Traceback (most recent call last):
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/webstore/webstore.py", line 89, in fetch_install_queue
    install_module(
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/module/__init__.py", line 498, in install_module
    raise e
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/module/__init__.py", line 437, in install_module
    set_stage_handler(args=args)
  File "/home/antonkulaga/micromamba/envs/dna-seq/lib/python3.10/site-packages/oakvar/module/__init__.py", line 275, in set_stage_handler
    args["install_state"] = stage_handler.install_state  # type: ignore
antonkulaga commented 2 years ago

Actually, I have no idea why it also asks for gtk-module stuff, they do not seem to be needed

rkimoakbioinformatics commented 2 years ago

@antonkulaga That is a strange error indeed. Probably it's a Linux thing. I'll look into it.

antonkulaga commented 2 years ago

I checked and I have it on at least two Linux machines. To reproduce - try to install any modules (for example Clinpred):

Traceback (most recent call last):
  File "/data/users/antonkulaga/micromamba/envs/dna-seq/lib/python3.9/site-packages/oakvar/webstore/webstore.py", line 89, in fetch_install_queue
    install_module(
  File "/data/users/antonkulaga/micromamba/envs/dna-seq/lib/python3.9/site-packages/oakvar/module/__init__.py", line 498, in install_module
    raise e
  File "/data/users/antonkulaga/micromamba/envs/dna-seq/lib/python3.9/site-packages/oakvar/module/__init__.py", line 437, in install_module
    set_stage_handler(args=args)
  File "/data/users/antonkulaga/micromamba/envs/dna-seq/lib/python3.9/site-packages/oakvar/module/__init__.py", line 275, in set_stage_handler
    args["install_state"] = stage_handler.install_state  # type: ignore
NameError: name 'stage_handler' is not defined
rkimoakbioinformatics commented 2 years ago

@antonkulaga Regarding the Gtk-Message, it seems to be related to Ubuntu and Firefox or Gtk. See https://askubuntu.com/questions/1306558/failed-to-load-module-canberra-gtk-module-proxychains for a solution with Firefox, which is installing Firefox with apt instead of snap. Another solution is at https://askubuntu.com/questions/1396739/failed-to-load-module-xapp-gtk3-module, which seems to point at installing missing modules with apt.

rkimoakbioinformatics commented 2 years ago

Regarding the issue with stage_handler, looking into it.

rkimoakbioinformatics commented 2 years ago

@antonkulaga Just published oakvar v2.5.8 which has a fix for the stage_handler issue.

antonkulaga commented 2 years ago

I confirm, I do not see stage_handler issue anymore