Flask URL variable type None?
<p>I'm trying to pass a number through URL and retrieve it on another page. If I try to specify the variable type, i get a malformed URL error and it won't compile. If I don't specify the var type, it will run, but the variable becomes Type None. I can't cast it to an int either. How can I pass it as an Integer...? Thanks in advance.</p>

<p>This gives me a malformed URL error:</p>

<pre><code>@app.route('/iLike/&lt;int: num&gt;', methods=['GET','POST'])
def single2(num):
</code></pre>

<p>This runs but gives me a var of type none that I can't work with:</p>

<pre><code>@app.route('/iLike/&lt;num&gt;', methods=['GET','POST'])
def single2(num):
     try:
        location = session.get('location')
        transType = session.get('transType')
        data = session.get('data')

        **num = request.args.get('num')**
</code></pre>

<p>Try this:</p>

<pre><code>@app.route('/iLike/&lt;int:num&gt;', methods=['GET','POST'])
def single2(num):
  print(num)
</code></pre>

python flask