question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrading to 1.1.0b1 produces TypeError during `nautobot-server post_upgrade`

See original GitHub issue

Environment

  • Python version: 3.8.10
  • Nautobot version: 1.1.0b1

Steps to Reproduce

  1. Functioning Nautobot installation version 1.0.2
  2. As nautobot user: pip3 install nautobot==1.1.0b1
  3. As nautobot user: nautobot-server post_upgrade

Expected Behavior

Upgrade to happen

Observed Behavior

TypeError upon nautobot-server post_upgrade

nautobot@in-amber-clad:~$ nautobot-server post_upgrade
Traceback (most recent call last):
  File "/opt/nautobot/bin/nautobot-server", line 8, in <module>
    sys.exit(main())
  File "/opt/nautobot/lib/python3.8/site-packages/nautobot/core/cli.py", line 55, in main
    run_app(
  File "/opt/nautobot/lib/python3.8/site-packages/nautobot/core/runner/runner.py", line 266, in run_app
    management.execute_from_command_line([runner_name, command] + command_args)
  File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/opt/nautobot/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/opt/nautobot/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/opt/nautobot/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/opt/nautobot/lib/python3.8/site-packages/nautobot_chatops/__init__.py", line 49, in ready
    super().ready()
  File "/opt/nautobot/lib/python3.8/site-packages/nautobot/extras/plugins/__init__.py", line 101, in ready
    register_plugin_menu_items(self.verbose_name, menu_items)
  File "/opt/nautobot/lib/python3.8/site-packages/nautobot/extras/plugins/__init__.py", line 380, in register_plugin_menu_items
    registry["nav_menu"]["tabs"]["Plugins"][list(registry["nav_menu"]["tabs"]["Plugins"])[-1]]["weight"]
TypeError: 'set' object is not subscriptable
nautobot@in-amber-clad:~$

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tim-fiolacommented, Jul 6, 2021

I was able to do the upgrade on a different installation:

Python: 3.8.5
Nautobot: from 1.0.1 to 1.1.0b1
Plugins installed: Chatbot
0reactions
tim-fiolacommented, Jul 7, 2021

I was able to get back into the server. registry["nav_menu"]["tabs"]["Plugins"][list(registry["nav_menu"]["tabs"]["Plugins"])[-1]] is a set, so when attempting to access ["weight"], it produces that error.

(Pdb) pprint(registry["nav_menu"]["tabs"]["Plugins"][list(registry["nav_menu"]["tabs"]["Plugins"])[-1]])
{'nautobot_device_onboarding.view_onboardingtask'}
(Pdb) pprint(registry["nav_menu"]["tabs"]["Plugins"][list(registry["nav_menu"]["tabs"]["Plugins"])[-1]])["weight"]
{'nautobot_device_onboarding.view_onboardingtask'}
*** TypeError: 'NoneType' object is not subscriptable
(Pdb) 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading Nautobot
Run the Post Upgrade Operations¶ · Applies any database migrations that were included in the release · Generates any missing cable paths among...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found