VIDA-NYU / reprozip

ReproZip is a tool that simplifies the process of creating reproducible experiments from command-line executions, a frequently-used common denominator in computational science.
https://www.reprozip.org/
BSD 3-Clause "New" or "Revised" License
305 stars 34 forks source link

UnboundLocalError: local variable `installer` referenced before assignment #382

Closed stoianmihail closed 2 years ago

stoianmihail commented 2 years ago

Hi!

I got the following error:

/space/stoian/test$ reprounzip installpkgs submission.rpz [REPROUNZIP] 22:00:01.249 ERROR: Couldn't select a package installer: Installing on Ubuntu but pack was generated on Arch

Uploading usage statistics is currently disabled Please help us by providing anonymous usage statistics; you can enable this by running: reprounzip usage_report --enable If you do not want to see this message again, you can run: reprounzip usage_report --disable Nothing will be uploaded before you opt in. Traceback (most recent call last): File "/home/stoian/.local/bin/reprounzip", line 8, in sys.exit(main()) File "/home/stoian/.local/lib/python3.9/site-packages/reprounzip/main.py", line 144, in main args.func(args) File "/home/stoian/.local/lib/python3.9/site-packages/reprounzip/unpackers/default.py", line 98, in installpkgs r, pkgs = installer.install(packages, assume_yes=args.assume_yes) UnboundLocalError: local variable 'installer' referenced before assignment

Thanks!

remram44 commented 2 years ago

Hi,

Thanks for reporting this. The program should have stopped after that first error message, I will fix it.

That error is genuine though: you can't natively install Ubuntu packages (which uses APT) on Arch Linux (which uses Pacman). You can however use the other unpackers, for example reproducing the environment in a Docker container or a virtual machine.

remram44 commented 2 years ago

Fixed by 8904cc79