<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I get a NameError when I use the noredirect code out of the documentation for python. in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-get-a-NameError-when-I-use-the-noredirect-code-out-of-the/m-p/197014#M9062</link>
    <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/41040463/is-this-code-in-the-dropbox-documentation-right" target="_blank"&gt;https://stackoverflow.com/questions/41040463/is-this-code-in-the-dropbox-documentation-right&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the report!&amp;nbsp;That sample is out of date. We'll get that fixed up.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like someone was kind enough to share an updated version in your StackOveflow post already.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2016 18:14:38 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-12-08T18:14:38Z</dc:date>
    <item>
      <title>I get a NameError when I use the noredirect code out of the documentation for python.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-get-a-NameError-when-I-use-the-noredirect-code-out-of-the/m-p/196994#M9058</link>
      <description>&lt;P&gt;There is something wrong with the example code in the dropbox documentation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from dropbox import DropboxOAuth2FlowNoRedirect

auth_flow = DropboxOAuth2FlowNoRedirect(APP_KEY, APP_SECRET)

authorize_url = auth_flow.start()
print "1. Go to: " + authorize_url
print "2. Click \"Allow\" (you might have to log in first)."
print "3. Copy the authorization code."
auth_code = raw_input("Enter the authorization code here: ").strip()

try:
    access_token, user_id = auth_flow.finish(auth_code)
except Exception, e:
    print('Error: %s' % (e,))
    return

dbx = Dropbox(access_token)&lt;/PRE&gt;&lt;P&gt;The source is &lt;A href="http://dropbox-sdk-python.readthedocs.io/en/master/moduledoc.html#module-dropbox.oauth" target="_blank"&gt;http://dropbox-sdk-python.readthedocs.io/en/master/moduledoc.html#module-dropbox.oauth&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is something wrong with the try/exception part. After that, it says&lt;/P&gt;&lt;PRE&gt;NameError: name 'access_token' is not defined&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:27:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-get-a-NameError-when-I-use-the-noredirect-code-out-of-the/m-p/196994#M9058</guid>
      <dc:creator>mehtez</dc:creator>
      <dc:date>2019-05-29T09:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: I get a NameError when I use the noredirect code out of the documentation for python.</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-get-a-NameError-when-I-use-the-noredirect-code-out-of-the/m-p/197014#M9062</link>
      <description>&lt;P&gt;[Cross-linking for reference:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/41040463/is-this-code-in-the-dropbox-documentation-right" target="_blank"&gt;https://stackoverflow.com/questions/41040463/is-this-code-in-the-dropbox-documentation-right&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the report!&amp;nbsp;That sample is out of date. We'll get that fixed up.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like someone was kind enough to share an updated version in your StackOveflow post already.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 18:14:38 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/I-get-a-NameError-when-I-use-the-noredirect-code-out-of-the/m-p/197014#M9062</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-12-08T18:14:38Z</dc:date>
    </item>
  </channel>
</rss>

