title: Reverse for ' ' with arguments '('',)' not found. 1 pattern(s) tried
body: <p>I'm getting this error anytime I click on this submit button on my listing page. I've looked through the typical places that this kind of error is triggered by but I can't see what I'm doing wrong here.</p>
  <p><strong>Error:</strong></p>
  <pre><code>Reverse for 'listing' with arguments '('',)' not found. 1 pattern(s) tried: ['listing/(?P&lt;id&gt;[0-9]+)$']
  </code></pre>
  <p>and further down on the page, on the traceback this line is highlighted as below. For clarity, it is highlighting the 2nd return render in that view.</p>
  <pre><code>auctions\views.py, line 229, in closeListing
              return render(request, &quot;auctions/closeListing.html&quot;, {
  </code></pre>
  <p>I know that in my views and urls I pass the argument of id but then on the template I pass the argument of listing.id but this has been working throughout my project for some reason but just not working here. I actually just tried to change all the arguments in views and urls to listing_id to match the listing.id in the template and this produced the exact same error so I'm really lost.</p>
  <p><strong>views.py</strong></p>
  <pre><code>def closeListing(request, id):
      bids = Bid.objects.filter(bid_item_id=id).order_by('-bid_input')
      winner = Bid.objects.filter(bid_item_id=id).latest('bid_input').bidder.id
      winner_name = Bid.objects.filter(bid_item_id=id).latest('bid_input').bidder.username
      currentHighest = Bid.objects.filter(bid_item_id=id).aggregate(Max('bid_input'))['bid_input__max']
      if request.method == &quot;POST&quot;:
          if bids == 0:
              return render(request, &quot;auctions/closeListing.html&quot;, {
                      &quot;bids&quot;: bids,
                      &quot;error&quot;: &quot;No bids have been placed on your listing&quot;,
                      })
          else:
              Listing.objects.filter(id=id).update(status='closed')
              Listing.objects.filter(id=id).update(winner=winner)
              closed = True
              return render(request, &quot;auctions/closeListing.html&quot;, {
                  &quot;bids&quot;: bids,
                  &quot;current&quot;: currentHighest,
                  &quot;winner&quot;: winner_name,
                  &quot;closed&quot;: True
              })
      else:
          return render(request, &quot;auctions/closeListing.html&quot;, {
              &quot;bids&quot;: bids
          })
  </code></pre>
  <p><strong>urls.py</strong></p>
  <pre><code>path(&quot;listing/&lt;int:id&gt;/close&quot;, views.closeListing, name=&quot;closelisting&quot;)
  </code></pre>
  <p><strong>listingPage.html</strong></p>
  <pre><code>{% if request.user.is_authenticated and request.user == listing.lister %}
  &lt;div&gt;
     &lt;form action=&quot;{% url 'closelisting' listing.id %}&quot; method=&quot;post&quot;&gt;
          {% csrf_token %}
          &lt;input type=submit value=&quot;Close Listing&quot;&gt;
     &lt;/form&gt;
  &lt;/div&gt;
  {% endif %}
  </code></pre>