richq / folders2flickr

Upload files to flickr
Other
102 stars 38 forks source link

KeyError: 'only_sub_sets' #8

Closed InterwebCounty closed 10 years ago

InterwebCounty commented 10 years ago

I may be doing something wrong but opening the 'folders2flickr' executable gives me this in the terminal:

~ J$ /Users/J/Sites/folders2flickr/folders2flickr ; exit;

Traceback (most recent call last):
  File "/Users/J/Sites/folders2flickr/folders2flickr", line 3, in <module>
    import f2flickr.uploadr
  File "/Users/J/Sites/folders2flickr/f2flickr/uploadr.py", line 16, in <module>
    import tags2set
  File "/Users/J/Sites/folders2flickr/f2flickr/tags2set.py", line 14, in <module>
    onlySubs = configuration.configdict.get('only_sub_sets')
  File "/Users/J/Sites/folders2flickr/f2flickr/configuration.py", line 24, in get
    raise KeyError(configparam)
KeyError: 'only_sub_sets'
logout

[Process completed]

I've tried setting 'only_sub_sets' to both true and false but it doesn't make a difference.

lbell commented 10 years ago

Sounds like you don't have the ini file setup:

Did you rename uploadr.ini.sample to uploadr.ini and make your changes there?

InterwebCounty commented 10 years ago

Yep, I renamed it to uploadr.ini and configured it like so: http://pastebin.com/D6tktu2v

Thanks for responding so fast, by the way.

lbell commented 10 years ago

Hmm... strange. What directory is uploadr.ini? There should be a printout stating: using uploadr.ini file "/path/to/uploadr.ini" when you run folders2flickr

InterwebCounty commented 10 years ago

Here it is two ways: http://imgur.com/a/ifiaj using pip and manually installing it. I get the error both ways.

Edit: It never says anything about where uploadr.ini is.

richq commented 10 years ago

Well, I've reproduced this. When you install via pip, it puts the sample file in the $PIP/share directory. But then as a user, you have no real idea where to copy/create a true config file.

It looks like you've placed it in $PIP_INSTALL/uploadr.ini, right? The program only looks in 2 places: ~/.uploadr.ini and uploadr.ini (i.e. in the current directory). I think I should make this error a lot nicer.

InterwebCounty commented 10 years ago

That seems to have fixed it!