ValueError when using format_entries

Issue #33 invalid
Former user created an issue

When trying to format_entries (pybtex/style/formatting/__init__.py) prior to using format_* (ie. format_article) enumerate errors with "ValueError: too many values to unpack". By changing 'enumerate(entries)' to 'enumerate(entries.iteritems())' the issue is resolved.

I've attached the test case I used to trigger this problem. Please let me know if I am using things incorrectly.

Pybtex: bzr-r711 Python: 2.6.6

Comments (3)

  1. Andrey Golovizin

    Style.format_entries accepts a list of entries, not a dict.

    You can use something like this:

    style.format_entries([bib_data.entries[key] for key bib_data.entry_keys)

  2. Log in to comment