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.

NetBox 2.10.3 - Server Error "ObjectChange.user" must be a "User"

See original GitHub issue

Environment

  • Python version: 3.6.8
  • NetBox version: 2.10.3

Steps to Reproduce

(GUI and API via Ansible module)

  1. Create VM with 1 NIC
  2. Create a IPv4 Address
  3. Assign IPv4 address to NIC
  4. Set IPv4 to primary IP on VM
- name: set primary IP4
     netbox.netbox.netbox_virtual_machine:
        netbox_url: "{{url}}"
        netbox_token: "{{token}}"
        validate_certs: no
   data:
     name: "{{server_name}}"
     primary_ip4: "{{IP}}"

Expected Behavior

IPv4 to be set as primary IP

Observed Behavior

1 out of every 5 or so request will error out. We have noticed other calls failing with the same error but this action is the most common that we have seen fail. This if after we upgraded to 2.10.3 Error:

<class 'ValueError'>

Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x7f0ea5454da0>>": "ObjectChange.user" must be a "User" instance.

Python version: 3.6.8
NetBox version: 2.10.3

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Dimaqacommented, Apr 1, 2021

@gmurman770 I’ve ran some tests suggested in https://github.com/netbox-community/netbox/issues/5142#issuecomment-726363506 and for some reason they showed even better time results

1reaction
Dimaqacommented, Mar 4, 2021

Setting threads=1 in gunicorn.py also fixed this issue for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - NetBox 2.10.3 - Server Error "ObjectChange.user ...
NetBox 2.10.3 - Server Error "ObjectChange.user" must be a "User · Environment. Python version: 3.6.8 · Steps to Reproduce. (GUI and API via...
Read more >
Nautobot v1.0 - To the Core Docs!
Nautobot v1.0¶. This document describes all new features and changes in Nautobot 1.0, a divergent fork of NetBox 2.10. For the launch of...
Read more >
gwdg-netz / nautobot-plugins / Nautobot Netbox Importer - gitlab
The plugin is compatible with Nautobot 1.0.0b3 and later and can handle JSON data exported from NetBox 2.10.3 thru 2.10.8 at present.
Read more >
FreshPorts -- net-mgmt/netbox: IP address management tool
Although unlikely to affect most installations, you may need to alter any reports which already use this name for a method. * Webhook...
Read more >
Cannot Assign "8": "Comment.Post" Must Be A "Post" Instance
... any user I get the following error. Cannot assign <House: jimmy>: Car.user must. ... Python version: 3.6.8; NetBox version: 2.10.3. <!
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