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

[DayOne] Listing all entries throws IndexError #780

Closed
my-flow opened this issue Dec 29, 2019 · 4 comments · Fixed by #786
Closed

[DayOne] Listing all entries throws IndexError #780

my-flow opened this issue Dec 29, 2019 · 4 comments · Fixed by #786
Labels
bug Something isn't working day one Issues related to Day One (dayoneapp.com) 🔒 Outdated

Comments

@my-flow
Copy link

my-flow commented Dec 29, 2019

I upgraded from version 1.9.8 (installed via Homebrew) to version 2.1.1 (installed via pip3).

fbreunig@nighttrain:~ $ jrnl --version
jrnl version 2.1.1

I’m using DayOne Classic integration with iCloud synchronization (find details in #689).

fbreunig@nighttrain:~ $ jrnl -ls
Journals defined in /Users/fbreunig/.config/jrnl/jrnl.yaml
 * default -> ~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/Journal_dayone

After upgrading I receive an IndexError: list index out of range when trying to list all entries:

fbreunig@nighttrain:~ $ jrnl --short
Traceback (most recent call last):
  File "/usr/local/bin/jrnl", line 8, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.7/site-packages/jrnl/cli.py", line 248, in run
    print(journal.pprint(short=True))
  File "/usr/local/lib/python3.7/site-packages/jrnl/Journal.py", line 148, in pprint
    pp = sep.join([e.pprint(short=short) for e in self.entries])
  File "/usr/local/lib/python3.7/site-packages/jrnl/Journal.py", line 148, in <listcomp>
    pp = sep.join([e.pprint(short=short) for e in self.entries])
  File "/usr/local/lib/python3.7/site-packages/jrnl/Entry.py", line 91, in pprint
    title = date_str + " " + self.title.rstrip("\n ")
  File "/usr/local/lib/python3.7/site-packages/jrnl/Entry.py", line 35, in title
    self._parse_text()
  File "/usr/local/lib/python3.7/site-packages/jrnl/Entry.py", line 25, in _parse_text
    if lines[0].strip().endswith("*"):
IndexError: list index out of range
@my-flow my-flow added 🆕 New! bug Something isn't working labels Dec 29, 2019
@wren wren removed the 🆕 New! label Jan 4, 2020
@wren
Copy link
Member

wren commented Jan 4, 2020

@MinchinWeb

@wren wren added the day one Issues related to Day One (dayoneapp.com) label Jan 4, 2020
MinchinWeb added a commit to MinchinWeb/jrnl that referenced this issue Jan 5, 2020
🎵 I have no body, no body to love me... 🎵

The bug is cause by a DayOne entry that has to entry body.
MinchinWeb added a commit to MinchinWeb/jrnl that referenced this issue Jan 5, 2020
@MinchinWeb
Copy link
Contributor

@my-flow You seem to have a "title only" entry. I guess somewhere it was assumed that an entry would always have a text body...

@wren c.f. #786 to fix this. Do we have a changelog that should be updated with these changes?

@wren wren closed this as completed in #786 Feb 8, 2020
wren pushed a commit that referenced this issue Feb 8, 2020
* Reproduce bug in #780
🎵 I have no body, no body to love me... 🎵
The bug is cause by a DayOne entry that has to entry body.

* Deal with empty bodies
Close #780.

* [Travis-CI] add "tree" command to debug missing files
* Fix file location
I have no idea why, but it ran locally fine without issue. Travis is more particular...
wren pushed a commit that referenced this issue Apr 18, 2020
* Reproduce bug in #780
🎵 I have no body, no body to love me... 🎵
The bug is cause by a DayOne entry that has to entry body.

* Deal with empty bodies
Close #780.

* [Travis-CI] add "tree" command to debug missing files
* Fix file location
I have no idea why, but it ran locally fine without issue. Travis is more particular...
@lock
Copy link

lock bot commented May 20, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the 🔒 Outdated label May 20, 2020
@lock
Copy link

lock bot commented May 20, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working day one Issues related to Day One (dayoneapp.com) 🔒 Outdated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants