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

Cant add any new entries #2

Open
RJDan opened this issue Jan 17, 2023 · 1 comment
Open

Cant add any new entries #2

RJDan opened this issue Jan 17, 2023 · 1 comment

Comments

@RJDan
Copy link

RJDan commented Jan 17, 2023

Hello,
This looks like a really cool tool. I tried it out for a few moments and I think Ive messed something up.
I added an entry with punch-card now-03:00 -p Personal:Computers
and now I've got the following error ....

The 'to' entry Store::Entry(@id="8a06cc06-efac-4cbd-ab1e-db382a8cab51", @type=Start, @time=2023-01-17 00:01:20.374000000 UTC, @project="Personal:Computers") is not of type Stop, although it should be

I can't add anything else. How could I correct?

@koffeinfrei
Copy link
Owner

Hi

This looks like a really cool tool.

Thanks 😺

Yep that part is not yet very solid. It can happen that with inserting wrong types (start / stop) or wrong times the entries don't make sense anymore.
For the time being you'll have to fix the entries manually in the sqlite database.

You can first check the entries of the affected day by doing something like the following:

sqlite3 ~/snap/punch-card/current/.config/punch-card/data.db "select time, type from entries where strftime('%Y-%m-%d', time) = '2023-01-17' order by time asc"

(The above assumes that you installed it with snap. Depending on how you installed the tool it the database file may also be in ~/.config/punch-card/data.db.)

The order of the output should indicate what the tool is trying to do. You may have to correct the time or the type of an entry.

Let me know where this is getting you.

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

2 participants