title: shelve: db type could not be determined
body: <p>I am using Pycharm. First of all whenever any module is imported in Pycharm. The complete import line fades out. But in case of <code>import shelve</code> doesn't fade out. Also when I run the file i get following errors:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/abhimanyuaryan/PycharmProjects/shelve/main.py", line 13, in &lt;module&gt;
      s = shelve.open("file.dat")
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shelve.py", line 239, in open
      return DbfilenameShelf(filename, flag, protocol, writeback)
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/shelve.py", line 223, in __init__
      Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/dbm/__init__.py", line 88, in open
      raise error[0]("db type could not be determined")
   dbm.error: db type could not be determined
  </code></pre>
  
  <p>Here's my code: </p>
  
  <pre><code>import shelve
  
  s = shelve.open("file.dat")
  
  s["first"] = (1182, 234, 632, 4560)
  s["second"] = {"404": "file is not present", "googling": "Google to search your content"}
  s[3] = ["abhilasha", "jyoti", "nirmal"]
  
  s.sync()
  
  print(s["first"])
  print(s["second"])
  print(s[3])
  </code></pre>