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

Setting filename_pattern for multiple galleries #520

Open
shanosborne opened this issue Jul 13, 2019 · 1 comment
Open

Setting filename_pattern for multiple galleries #520

shanosborne opened this issue Jul 13, 2019 · 1 comment

Comments

@shanosborne
Copy link

When trying to create multiple galleries, I can set example_dirs and gallery_dirs to be lists, but I don't seem to be able to set filename_pattern to a list (which would allow me to set a different pattern for each of the galleries). When I try, I get the error:

Exception occurred:
  File "/Users/sosborne/miniconda3/envs/astroconda/lib/python3.6/re.py", line 289, in _compile
    p, loc = _cache[type(pattern), pattern, flags]
TypeError: unhashable type: 'list'
The full traceback has been saved in /var/folders/2c/0tbd0pkx6914vm8v2dvp2s3h0001jg/T/sphinx-err-gykhtvce.log, if you want to report the issue to the developers.

Is there a workaround / plan to make this possible?

@larsoner
Copy link
Contributor

Nobody has thought of this that I know of. I have no problem with making this entry a str or list-like (tuple or list), where the str effectively (currently) gets promoted to [filename_pattern] * n_galleries. I don't think it would be too much work to code.

Let's wait a couple of days to see what others think, and if nobody objects, do you want to try doing it with a PR?

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

No branches or pull requests

3 participants