Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File globing behaviour #7

Open
musically-ut opened this issue Feb 12, 2011 · 1 comment
Open

File globing behaviour #7

musically-ut opened this issue Feb 12, 2011 · 1 comment

Comments

@musically-ut
Copy link

Ran into a small issue with the build_mosaic() function in core.py, line 76:

files = glob.glob(os.path.join(collection_path, '*.jpg'))

My files ended with the extention "*.JPG". The traceback or the error I got was the following:

Traceback (most recent call last):
  File "/usr/local/bin/pymos", line 5, in <module>
    pkg_resources.run_script('PyMos==0.6', 'pymos')
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.6/dist-packages/PyMos-0.6-py2.6.egg/EGG-INFO/scripts/pymos", line 59, in <module>
    new_colormap=args.new_colormap)
  File "/usr/local/lib/python2.6/dist-packages/PyMos-0.6-py2.6.egg/pymos/core.py", line 130, in build_mosaic
    if (colormap[match[2]][2] == None):   # has not been resized yet
IndexError: list index out of range

which was rather unhelpful.

Two points:

  1. A case insensitive glob might be better here.
  2. One should make sure that the number of files is not 0 in the collection_path directory.

~
musically_ut

@ideamonk
Copy link
Owner

Hey,

Thanks for a detailed bug report, shall fix asap.

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants