tblancher / pymazon

Automatically exported from code.google.com/p/pymazon
Other
0 stars 0 forks source link

Presence of amz_dir setting in ~/.pymazon/pymazonrc causes pymazon to abort on startup #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I previously had v. 0.1.1 installed, and my pymazonrc file ha[ds] the amz_dir 
directive pointing at /home/ron/Downloads. After installing 0.9, pymazon aborts 
with the following information:

$ pymazon
Traceback (most recent call last):
  File "/usr/local/bin/pymazon", line 23, in <module>
    from pymazon.core.options import parse_options
  File "/usr/local/lib/python2.6/dist-packages/pymazon/core/options.py", line 22, in <module>
    from pymazon.core.settings import settings
  File "/usr/local/lib/python2.6/dist-packages/pymazon/core/settings.py", line 181, in <module>
    settings = _PymazonSettings()
  File "/usr/local/lib/python2.6/dist-packages/pymazon/core/settings.py", line 85, in __init__
    self._read_config_file()
  File "/usr/local/lib/python2.6/dist-packages/pymazon/core/settings.py", line 170, in _read_config_file
    settings.amz_dir = amz_dir
NameError: global name 'settings' is not defined

I removed my old pymazonrc file, and pymazon starts fine. After reconfiguring 
pymazon through the Preferences dialog, I manually added the amz_dir entry to 
the pymazonrc file and get the same abort diagnostics above. 

Has the amz_dir directive been deprecated? How do I specify where the .amz 
files will reside?

Original issue reported on code.google.com by ron.stew...@gmail.com on 20 Jul 2010 at 12:27

GoogleCodeExporter commented 8 years ago
Ah yep that's a bug. The amz_dir was never actually used for anything, so I 
removed it from the config file but it appears I forgot to remove the relevant 
code from the settings.py. oops! Thanks for finding it. 

You specify where you amz files will reside however you want. Probably when you 
download them with your web browser from Amazon. 

The original intent was to make amz_dir the default directory when the file 
selection dialog pops up. But I decided against it as I really don't think its 
necessary now that Pymazon properly supports opening multiple amz files 
simultaneously.

For you fix, just delete your pymazonrc file and let Pymazon make you a new 
one. Then, don't add the amz_dir field. I will remove the offending code for 
the 1.0 release.

Original comment by SCColbert@gmail.com on 20 Jul 2010 at 12:43