title: Cannot resolve NoReverseMatch error in Django
body: <p>I am new in Django and try to make a quick search engine, but I have this error and cannot fix it after reading Django documentation. Could anyone help me? Thanks.</p>
  <p>This is the error:</p>
  <pre><code>Reverse for 'search' with no arguments not found. 1 pattern(s) tried: ['(?P&lt;name&gt;[^/]+)$']
  </code></pre>
  <p>My codes are as below:</p>
  <p>layout.html</p>
  <pre><code>        &lt;form method=&quot;POST&quot; action=&quot;{% url 'encyclopedia:search' %}&quot;&gt;
              {% csrf_token %}
              &lt;input class=&quot;search&quot; type=&quot;text&quot; name=&quot;q&quot; placeholder=&quot;Search Encyclopedia&quot;&gt;
              &lt;input type=&quot;submit&quot; value=&quot;Go&quot;&gt;
          &lt;/form&gt;
  </code></pre>
  <p>urls.py</p>
  <pre><code>from django.urls import path
  
  from . import views
  
  app_name = &quot;encyclopedia&quot;
  
  urlpatterns = [
      path(&quot;&quot;, views.index, name=&quot;index&quot;),
      path(&quot;&lt;str:name&gt;&quot;, views.entry, name=&quot;entry&quot;),
      path(&quot;&lt;str:name&gt;&quot;, views.search, name=&quot;search&quot;)
  ]
  </code></pre>
  <p>views.py</p>
  <pre><code>def search(request, searched_name):
      &quot;&quot;&quot;
      Deal with search engine on the left widget
      &quot;&quot;&quot;
      result = util.get_entry(searched_name)
  
      if result:
          return HttpResponseRedirect(reverse('encyclopedia:entry', args=(result)))
      
      return render(request, &quot;encyclopedia/error.html&quot;, {
          &quot;error_name&quot;: &quot;Requested page not found&quot;
      })    
  </code></pre>