![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
Issue with OneDrive update (macOS)
Somewhere in last few months, Microsoft has started naming the 'real' folder name to OneDrive-Personal (I guess to distinguish it from OneDrive Enterprise). It used to be just /OneDrive.
In Finder, one still sees 'OneDrive' in Locations, and if you Go To Folder /Users/username/Library/CloudStorage/. So it's some sort of Finder alias. Full path name on macOS is: Code:
/Users/[accountname]/Library/CloudStorage/OneDrive-Personal When starting calibre, I was getting 'cannot find catalog' error, which proposed creating a new catalog, which I did not want to do. So I was quitting calibre, and somehow stumbled on gui.json, where I discovered two entries (I think order was reversed): Code:
"library_usage_stats": { "/Users/thomas/Library/CloudStorage/OneDrive-Personal/calibre": 19, "/Users/thomas/Library/CloudStorage/OneDrive/calibre": 384 }, Then I discovered that cancelling the error dialog opened the existing location and I was able to just click Open. But continued to present error on each launch. Finally googled OneDrive-Personal and realized I had been removing the wrong entry. I removed the (incorrect) '/OneDrive/', and since doing this, calibre has been launching without error. However, the (incorrect) '/OneDrive/' entry is getting restored for some reason. It's apparently not causing problems because evidently calibre is able to update library usage stat for the correct location without tripping over it. But JSON doesn't define 'order' and so json package would not be wrong to read it in to Python dict in the other order, and then error will recur. Is there some way to keep the incorrect entry from getting restored? I'm looking at files in /Users/thomas/Library/Preferences/calibre and don't see any other instance of '/OneDrive/' string in any of the files there. Last edited by tomsem; 06-14-2023 at 05:43 PM. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,470
Karma: 239219543
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
You should not keep your active library in any folder OneDrive is syncing. Only a mirrored copy.
|
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
![]() |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,470
Karma: 239219543
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
As I said, you can mirror a copy to OneDrive. The thing with an active library on a network drive or a cloud drive is that it works until it doesn't, and by the time you notice the problem it may already be too late to fix, unless you also have a backup somewhere else. This is from personal experience (had a bad data loss with OneDrive years ago, fortunately I had a back-up elsewhere).
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
library_usage_stats is not used to choose the startup library unless connecting to the existing one fails.
|
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you grep for the path you will find it in gloabl.py.json
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
|
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
|
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,470
Karma: 239219543
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
I use FreeFileSync (mirror option, not two-way). After the initial copy has been created, it only updates the files that have been changed, so it's very fast. There is a MacOS version too.
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
|
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
I had the error recur and ran calibre-debug -g to see what might have been the trigger.
Saw this: Quote:
The library_usage_stat turd has remained 'gone'. Apparently it's created when one select the library folder with system dialog, where you only see 'OneDrive'. Is Qt not returning real path or something? Last edited by tomsem; 06-15-2023 at 03:36 AM. |
|
![]() |
![]() |
![]() |
#13 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,347
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That error indicates something on your system is creating/deleteing/renaming files inside the folder while calibre is trying to delete it. Having multiple things write to the same locations on the file system is a recipe for data loss.
|
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,939
Karma: 27060151
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
Perhaps, though it is not at all obvious what the 'something' might be.
In any case, everything is working as expected now. Thanks for your help. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MacOS ActiveState TCL 8.6.x and Sigil issue | DiapDealer | Plugins | 28 | 02-20-2022 12:28 PM |
[MacOS] 5.27.0 update | dingrr | Calibre | 2 | 09-23-2021 02:35 PM |
macOS 10.15.2 Update solved the "Popping" issue on my 16-inch MBP | WilliamLucas | Apple Devices | 1 | 12-19-2019 08:54 AM |
[MacOS] update to 3.37.0 problems | ChipAHoy | Calibre | 1 | 01-05-2019 03:05 PM |
macOS update installation issue | OtinG | Apple Devices | 0 | 12-28-2018 10:45 AM |