Internal server error on cable delete request #3010

Closed
opened 2025-12-29 18:24:43 +01:00 by adam · 4 comments
Owner

Originally created by @ajknv on GitHub (Nov 13, 2019).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.6

Steps to Reproduce

  1. Start with a racked device that has connected cables.
  2. "Remove" the device from its rack: PATCH request with "rack", "position", and "face" set to none.
  3. Update the device to be at a different site: PATCH request with a different site id.
  4. Attempt to delete one of the cables attached to the device.

Expected Behavior

The cable should be deleted.

Observed Behavior

<html lang="en">

<head>
    <title>Server Error</title>
    <link rel="stylesheet" href="/static/bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/font-awesome-4.7.0/css/font-awesome.min.css">
    <meta charset="UTF-8">
</head>

<body>
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <div class="panel panel-danger" style="margin-top: 200px">
                    <div class="panel-heading">
                        <strong>
                            <i class="fa fa-warning"></i>
                            Server Error
                        </strong>
                    </div>
                    <div class="panel-body">

                            <p>
                                There was a problem with your request. Please contact an administrator.
                            </p>

                        <hr />
                        <p>
                            The complete exception is provided below:
                        </p>
<pre><strong>&lt;class &#39;ValueError&#39;&gt;</strong><br />
Cannot assign &quot;&lt;SimpleLazyObject: &lt;django.contrib.auth.models.AnonymousUser object at 0x7f4e9334b690&gt;&gt;&quot;: &quot;ObjectChange.user&quot; must be a &quot;User&quot; instance.</pre>
                        <p>
                            If further assistance is required, please post to the <a href="https://groups.google.com/forum/#!forum/netbox-discuss">NetBox mailing list</a>.
                        </p>
                        <div class="text-right">
                            <a href="/" class="btn btn-primary">Home Page</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
Originally created by @ajknv on GitHub (Nov 13, 2019). ### Environment * Python version: 3.6.8 * NetBox version: 2.6.6 ### Steps to Reproduce 1. Start with a racked device that has connected cables. 2. "Remove" the device from its rack: PATCH request with "rack", "position", and "face" set to none. 3. Update the device to be at a different site: PATCH request with a different site id. 4. Attempt to delete one of the cables attached to the device. ### Expected Behavior The cable should be deleted. ### Observed Behavior ```<!DOCTYPE html> <html lang="en"> <head> <title>Server Error</title> <link rel="stylesheet" href="/static/bootstrap-3.4.1-dist/css/bootstrap.min.css"> <link rel="stylesheet" href="/static/font-awesome-4.7.0/css/font-awesome.min.css"> <meta charset="UTF-8"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-6 col-md-offset-3"> <div class="panel panel-danger" style="margin-top: 200px"> <div class="panel-heading"> <strong> <i class="fa fa-warning"></i> Server Error </strong> </div> <div class="panel-body"> <p> There was a problem with your request. Please contact an administrator. </p> <hr /> <p> The complete exception is provided below: </p> <pre><strong>&lt;class &#39;ValueError&#39;&gt;</strong><br /> Cannot assign &quot;&lt;SimpleLazyObject: &lt;django.contrib.auth.models.AnonymousUser object at 0x7f4e9334b690&gt;&gt;&quot;: &quot;ObjectChange.user&quot; must be a &quot;User&quot; instance.</pre> <p> If further assistance is required, please post to the <a href="https://groups.google.com/forum/#!forum/netbox-discuss">NetBox mailing list</a>. </p> <div class="text-right"> <a href="/" class="btn btn-primary">Home Page</a> </div> </div> </div> </div> </div> </div> </body> </html> ```
adam added the status: duplicate label 2025-12-29 18:24:43 +01:00
adam closed this issue 2025-12-29 18:24:43 +01:00
Author
Owner

@DanSheps commented on GitHub (Nov 14, 2019):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list instead.

(Hint: Your version is out of date)

@DanSheps commented on GitHub (Nov 14, 2019): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided [here](https://github.com/digitalocean/netbox/issues/new/choose). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss) instead. (Hint: Your version is out of date)
Author
Owner

@ajknv commented on GitHub (Nov 14, 2019):

What? I'm reporting a reproducible sequence of actions that causes Netbox to return an HTTP 500 response to a reasonable API request. Barring additional rationale it shouldn't even be an error response, but if that is the contention then surely it should at least be returning a gracefully handled error response?

@ajknv commented on GitHub (Nov 14, 2019): What? I'm reporting a reproducible sequence of actions that causes Netbox to return an HTTP 500 response to a reasonable API request. Barring additional rationale it shouldn't even be an error response, but if that is the contention then surely it should at least be returning a gracefully handled error response?
Author
Owner

@DanSheps commented on GitHub (Nov 14, 2019):

You are reporting a reproducible sequence that is fixed in the latest version.

This is bug reporting 101, check the release notes and you would see that the error reported "Anonymous User" is fixed by the rewrite of the change logging middleware.

@DanSheps commented on GitHub (Nov 14, 2019): You are reporting a reproducible sequence that is fixed in the latest version. This is bug reporting 101, check the release notes and you would see that the error reported "Anonymous User" is fixed by the rewrite of the change logging middleware.
Author
Owner

@DanSheps commented on GitHub (Nov 14, 2019):

Duplicate #3622

@DanSheps commented on GitHub (Nov 14, 2019): Duplicate #3622
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3010