papis / papis-rofi

Rofi based papis interface
15 stars 5 forks source link

Crash: AttributeError: module 'papis.format' has no attribute 'Document' #11

Open pinusc opened 6 months ago

pinusc commented 6 months ago

Running this against current papis main branch (although the version hasn't been updated in over a year), I would get the following error:

AttributeError: module 'papis.format' has no attribute 'Document'

caused on line 151 of main.py.

This crashes papis-rofi and makes it unusable.

This is due to an incorrect import: Document class is actually defined in papis.document, not papis.format, and was previously importable from the latter due to python shenanigans... but now that it's not imported there anymore, the code breaks. There's an easy fix, and I am about to make a PR for it.

Currently, the last release of papis (0.13) doesn't run into this issue, but once the version is bumped then papis-rofi will stop working for everyone.