gnuradio / pybombs

PyBOMBS (Python Build Overlay Managed Bundle System) is the GNU Radio install management system for resolving dependencies and pulling in out-of-tree projects.
https://gnuradio.org
GNU General Public License v3.0
415 stars 189 forks source link

pybombs recipes list, AttributeError #457

Closed lryindra closed 7 years ago

lryindra commented 7 years ago

I'm seeing an AttributeError when executing pybombs recipes list command. I saw this error on Ubuntu 17.04 32-bit and Ubuntu 16.04 64-bit. The virtual environment is Python 3.5. I'm seeing this same error on a clean install of Ubuntu 16.04 64-bit with python2.7 (no virtual environment).

Also this error is gone if I remove all added pybombs recipes. And this error is gone if I run 'pybombs prefix init ~/prefix -a myprefix -R gnuradio-default'.

(.venv) lryindra@lryindra-VirtualBox:~/Desktop/radio$ pybombs recipes list
PyBOMBS - INFO - PyBOMBS Version 2.3.1
PyBOMBS.Packager.apt - INFO - Install python-apt to speed up apt processing.
Loading package information.....Traceback (most recent call last):
  File "/home/lryindra/Desktop/radio/.venv/bin/pybombs", line 11, in <module>
    sys.exit(main())
  File "/home/lryindra/Desktop/radio/.venv/lib/python3.5/site-packages/pybombs/main.py", line 32, in main
    return dispatch() or 0
  File "/home/lryindra/Desktop/radio/.venv/lib/python3.5/site-packages/pybombs/commands/base.py", line 194, in dispatch
    return get_cmd_dict(cmd_list)[args.command](cmd=args.command, args=args).run()
  File "/home/lryindra/Desktop/radio/.venv/lib/python3.5/site-packages/pybombs/commands/base.py", line 120, in run
    return self.subcommands[self.args.sub_command]['run'](self)()
  File "/home/lryindra/Desktop/radio/.venv/lib/python3.5/site-packages/pybombs/commands/recipes.py", line 218, in run_list
    'installed_by': format_pkg_list(pkgmgr.installed(pkg, return_pkgr_name=True)),
  File "/home/lryindra/Desktop/radio/.venv/lib/python3.5/site-packages/pybombs/package_manager.py", line 174, in installed
    pkg_version = pkgr.installed(r)
AttributeError: 'NoneType' object has no attribute 'installed'
mbr0wn commented 7 years ago

Hm, can't repro. Can you give me a path to this error? I tried installing PyBOMBS into a clean Docker; didn't cause this error.

mbr0wn commented 7 years ago

Ah, could repro after also running pybombs recipes add-defaults

mbr0wn commented 7 years ago

OK: Problem is, when there's no prefix, we don't instantiate a source package manager, but we need it to learn details about OOTs.

mbr0wn commented 7 years ago

I think cb0f5b91fcc3b97b9f6c3fa6fd3be63901612482 should fix this.

lryindra commented 7 years ago

Thank you.


From: Martin Braun [notifications@github.com] Sent: Thursday, September 14, 2017 10:42 AM To: gnuradio/pybombs Cc: Laura Yindra; Author Subject: Re: [gnuradio/pybombs] pybombs recipes list, AttributeError (#457)

I think cb0f5b9https://github.com/gnuradio/pybombs/commit/cb0f5b91fcc3b97b9f6c3fa6fd3be63901612482 should fix this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/gnuradio/pybombs/issues/457#issuecomment-329523124, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AawlAorghGByaQVDzeBzvont3opI1Mzsks5siUljgaJpZM4PQgJm.

jep commented 7 years ago

I just installed PyBOMBS version 2.3.2 on a fresh install of Linux Mint 18.2 Cinnamon 64-bit. I get the same error when running pybombs recipes list

Traceback (most recent call last): File "/usr/local/bin/pybombs", line 11, in load_entry_point('PyBOMBS==2.3.2', 'console_scripts', 'pybombs')() File "/usr/local/lib/python2.7/dist-packages/pybombs/main.py", line 32, in main return dispatch() or 0 File "/usr/local/lib/python2.7/dist-packages/pybombs/commands/base.py", line 194, in dispatch return get_cmd_dict(cmd_list)[args.command](cmd=args.command, args=args).run() File "/usr/local/lib/python2.7/dist-packages/pybombs/commands/base.py", line 120, in run return self.subcommands[self.args.sub_command]'run'() File "/usr/local/lib/python2.7/dist-packages/pybombs/commands/recipes.py", line 238, in run_list 'installed_by': format_pkg_list(pkgmgr.installed(pkg, return_pkgr_name=True)), File "/usr/local/lib/python2.7/dist-packages/pybombs/package_manager.py", line 174, in installed pkg_version = pkgr.installed(r) AttributeError: 'NoneType' object has no attribute 'installed'

is there a way to apply the new fix or is it not yet released?

mbr0wn commented 7 years ago

@jep Check out the manual for how to do a pip install from git, and then you'll have the fix.

mbr0wn commented 7 years ago

@lryindra @jep Please reopen if you don't think this is fixed on the latest git version.