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

"The line is not ending the record. " Strange behavior with quotes and a bib item with only one field #12

Open
devmessias opened this issue Aug 19, 2017 · 1 comment

Comments

@devmessias
Copy link
Member

Using

@misc{SM,
    note="Supplemental Material reference"
 }

don't work

Using

@misc{SM,
    note="Supplemental Material reference",
 }

work

Using

@misc{SM,
    note={"Supplemental Material reference"}
 }

work

The source code

import logging
import logging.config
from bibtexparser.bparser import BibTexParser

logger = logging.getLogger(__name__)

logging.config.dictConfig({
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'standard': {
            'format': '%(asctime)s [%(levelname)s] %(name)s %(funcName)s:%(lineno)d: %(message)s'
        },
    },
    'handlers': {
        'default': {
            'level':'DEBUG',
            'formatter': 'standard',
            'class':'logging.StreamHandler',
        },
    },
    'loggers': {
        '': {
            'handlers': ['default'],
            'level': 'DEBUG',
            'formatter': 'standard',
            'propagate': True
        }
    }
})


if __name__ == '__main__':
    bibtex = """@misc{SM,
    note="Supplemental Material reference"
    }
    """

    with open('/tmp/bibtex.bib', 'w') as bibfile:
        bibfile.write(bibtex)


    with open('/tmp/bibtex.bib', 'r') as bibfile:
        bp = BibTexParser(bibfile.read())
        print(bp.get_entry_list())
@devmessias
Copy link
Member Author

See sciunto-org/python-bibtexparser#178

This bug will be solved when bibtexparser 0.7 will release.

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

1 participant