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

Calendar color update #8

Closed
handuozh opened this issue Feb 23, 2021 · 11 comments
Closed

Calendar color update #8

handuozh opened this issue Feb 23, 2021 · 11 comments
Labels
bug Something isn't working

Comments

@handuozh
Copy link

handuozh commented Feb 23, 2021

Hi.
Firstly really love this tool and it is now my daily tool!

I am wondering how does Lupin scan the daily notes and update the state in a repeated way?

E.g. the date of generating the calendar was 19th and today is already 23th but the bold date is still 19.

image

Also wish you could scan the files and if it is empty, also label that daily note as "void", the same as the dates with no files.

@akhater akhater added the enhancement New feature or request label Feb 23, 2021
@akhater
Copy link
Owner

akhater commented Feb 23, 2021

Hi @handuozh
Lupin scans at start up and then every GitHubUpdateFrequency minutes, by default it is every 720 min / 12 hrs

it is really weird that it was no updated for you in 3 days, in your terminal are you seeing a "Scheduled Housekeeping" message appearing? it is when it is building them

for the second request sure I can do that, I was./am reluctant since it will take more time but no worries I'll do it

@handuozh
Copy link
Author

Sorry for the late reply. I just checked the output and really found some errors:

Scheduled Housekeeping ...

No error handlers are registered, logging exception.

Traceback (most recent call last):

  File "/usr/local/lib/python3.6/site-packages/apscheduler/executors/base.py", line 125, in run_job

    retval = job.func(*job.args, **job.kwargs)

  File "main.py", line 281, in scheduledHousekeeping

    Git2Json()

  File "/home/christlurker/softwares/Lupin.LogSeqPyBot/git.py", line 156, in Git2Json

    AllFilesContent.append(getGitFileContent(content))

  File "/home/christlurker/softwares/Lupin.LogSeqPyBot/git.py", line 123, in getGitFileContent

    return file.decoded_content.decode("utf-8")  # Get raw string data

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

@handuozh
Copy link
Author

For the 2nd request, it is not that important, actually. 😆 No need to worry about this.

@akhater
Copy link
Owner

akhater commented Feb 23, 2021

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

very interesting 🤔I have no clue what this error actually means but I will take a look at that

thanks for the feedback

@akhater
Copy link
Owner

akhater commented Feb 23, 2021

is it possible that you have in your logseg/pages or /journal directories a non-text file? like image etc...

@akhater akhater added the bug Something isn't working label Feb 23, 2021
@handuozh
Copy link
Author

handuozh commented Feb 23, 2021

I don't have non-text files but have some non-ascii files like Chinese characters and emoji ❤️ under pages/. Not sure if they could be decoded by utf8. U can check out my public repo as u like https://github.com/handuozh/logseq-notes

@akhater
Copy link
Owner

akhater commented Feb 23, 2021

i'll clone your public repo and give it a try
please allow me some time

@akhater
Copy link
Owner

akhater commented Feb 23, 2021

seems I was right "pages/dynaslam.png" no prob easier than I thought

akhater added a commit that referenced this issue Feb 23, 2021
HotFix for unhandled error when faced with non-text file
#8
@akhater
Copy link
Owner

akhater commented Feb 23, 2021

Hotfix released in e90b14c

should be working now. I'd appreciate your feedback

@handuozh
Copy link
Author

Hotfix released in e90b14c

should be working now. I'd appreciate your feedback

Thank you so much and sorry for the late reply and for wasting some of your time checking my repo 👍

When I replied to you, I was in bed browsing the mobile Github so cannot easily filter out file types ignoring that .png file. 🤣
Now it works

@akhater
Copy link
Owner

akhater commented Feb 24, 2021

No matter how you spin it, it was an unhandled error from my side and I appreciate your help on this

I will remove the feature request tag from this one, please feel free to open another issue for that

@akhater akhater removed the enhancement New feature or request label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants