title: Python error: sqlite3.OperationalError: no such table: config
body: <p>I'm need to change the drop box default folder, via command line(because I need to do this in another machine in my local network,so I will access this machine via protocol ssh from the my local machine)to another folder, I search in the Internet and the solution is the same in all the that I find, use this python script:</p>
  <pre><code>&gt; #!/usr/bin/env  
  &gt; # Script for showing or setting the dropbox folder.
  &gt; #
  &gt; # Execute without options to show current dropbox folder (if non-default).
  &gt; # Execute with --setfolder=/foo/bar to set new dropbox folder.
  &gt; #
  &gt; # I dedicate this work to the public domain by waiving all my rights to the
  &gt; # work worldwide under copyright law, including all related and neighboring
  &gt; # rights, to the extent allowed by law.
  &gt; #
  &gt; # You can copy, modify, distribute and perform the work, even for commercial
  &gt; # purposes, all without asking permission.
  &gt; #
  &gt; # Wim Coenen (wcoenen@gmail.com).
  
  import base64
  import optparse
  import os
  import os.path
  import sqlite3
  
  # parse command line options
  cmdparser = optparse.OptionParser()
  cmdparser.add_option(&quot;-s&quot;,&quot;--setfolder&quot;, dest=&quot;folder&quot;,
    help=&quot;set dropbox folder&quot;)
  (options, args) = cmdparser.parse_args()
  
  db_path = os.path.expanduser(&quot;~/.dropbox/dropbox.db&quot;)
  db = sqlite3.connect(db_path)
  cursor = db.cursor()
  
  # get dropbox_path
  cursor.execute(&quot;select value from config where key='dropbox_path'&quot;)  
  dropbox_path = &quot;&lt;default&gt;&quot;
  for entry in cursor:
     dropbox_path_base64 = entry[0]
     dropbox_path_raw = base64.decodestring(dropbox_path_base64)
     dropbox_path = dropbox_path_raw[1:-5]
  print &quot;current dropbox path: %s&quot; % dropbox_path
  
  if not options.folder is None:
     new_path_raw = &quot;V&quot; + os.path.abspath(options.folder) + &quot;\np1\n.&quot;
     new_path_base64 = base64.encodestring(new_path_raw) 
     cursor.execute(&quot;delete from config where key='dropbox_path'&quot;)
     cursor.execute(&quot;insert into config (key,value) values (?,?)&quot;, \
        (&quot;dropbox_path&quot;, new_path_base64))
     db.commit()
     print &quot;new dropbox path: %s&quot; % options.folder
     
  db.close()
  </code></pre>
  <p>here it is the tutorial link what I followed: <a href="https://whatbox.ca/wiki/Dropbox" rel="nofollow noreferrer">https://whatbox.ca/wiki/Dropbox</a></p>
  <p>So, I'm very newbie with python, when I try execute this script</p>
  <pre><code>python ~/Downloads/dropboxdir.py --setfolder=/home/user/new_folder
  </code></pre>
  <p>he returnd this error:</p>
  <blockquote>
  <p><em>cursor.execute(&quot;select value from config where key='dropbox_path'&quot;)</em></p>
  <p>sqlite3.OperationalError: no such table: config</p>
  </blockquote>
  <p>So guys, I need a light, any help is welcome.</p>