qwertydog / Reddit-Wallpaper-Changer

Reddit Wallpaper Changer
MIT License
45 stars 8 forks source link

database missing #2

Closed aemyers closed 3 years ago

aemyers commented 3 years ago

does not track favorites, blacklist, or history

i do not see a sqlite file anywhere. is there some kind of initialization/reset of the database? backup creates a 0 byte file. restore from the 0 byte doesn't seem to put it anywhere either.

am i overlooking something?

micscala commented 3 years ago

Hi! I resolved this issue doing this:

This would allow it to create the SQL files correctly at first run. After that, it works fine.

aemyers commented 3 years ago

I just ran through all those steps myself, unfortunately, still no luck. Not sure if the log will help or not...

5/19/2021 5:49:36 AM - ALAPTOP - AddVersionAsync - WARNING: Unexpected error adding version to database: SQL logic error
no such table: version
5/19/2021 5:49:36 AM - ALAPTOP - RWC_Load - INFORMATION: ===================================================================================================================
5/19/2021 5:49:36 AM - ALAPTOP - RWC_Load - INFORMATION: Reddit Wallpaper Changer Version 1.0.15.0
5/19/2021 5:49:36 AM - ALAPTOP - RWC_Load - INFORMATION: RWC is starting.
5/19/2021 5:49:36 AM - ALAPTOP - RWC_Load - INFORMATION: RWC Interface Loaded.
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Auto Start: False
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Start In Tray: False
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Proxy Enabled: False
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: AppData Directory: C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Thumbnail Cache: C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer\ThumbnailCache
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Automatically check for updates: True
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Save location for wallpapers: C:\Users\Allen\Pictures\Saved Wallpapers
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Auto Save Favourite Wallpapers: False
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Auto Save All Wallpapers: False
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Grab Type: 0
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Selected Subreddits: wallpapers+wallpaper
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Fade Effect: True
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Search Query: 1920x1080 nsfw:no
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Change wallpaper every 10 Minutes
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Number of detected displays: 2
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Position: Stretch
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Validate wallpaper size: False
5/19/2021 5:49:36 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Info Popup: False
5/19/2021 5:49:36 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Successfully connected to database 'Reddit-Wallpaper-Changer.sqlite'
5/19/2021 5:49:36 AM - ALAPTOP - MigrateOldBlacklistAsync - INFORMATION: Migrating Blacklist.xml to 'Reddit-Wallpaper-Changer.sqlite'. This is a one off task...
5/19/2021 5:49:36 AM - ALAPTOP - MigrateOldBlacklistAsync - INFORMATION: No blacklist.xml file to migrate
5/19/2021 5:49:36 AM - ALAPTOP - BuildThumbnailCacheAsync - INFORMATION: Updating wallpaper thumbnail cache.
5/19/2021 5:49:36 AM - ALAPTOP - GetFromHistoryAsync - WARNING: Unexpected error retrieving History from database: SQL logic error
no such table: history
5/19/2021 5:49:36 AM - ALAPTOP - GetFromFavouritesAsync - WARNING: Unexpected error retrieving favourites from database: SQL logic error
no such table: favourites
5/19/2021 5:49:36 AM - ALAPTOP - GetFromBlacklistAsync - WARNING: Unexpected error retrieving Blacklist from database: SQL logic error
no such table: blacklist
5/19/2021 5:49:36 AM - ALAPTOP - BuildThumbnailCacheAsync - WARNING: Error updating Wallpaper thumbnail cache: Object reference not set to an instance of an object.
5/19/2021 5:49:36 AM - ALAPTOP - PopulateHistoryAsync - INFORMATION: Refreshing History panel.
5/19/2021 5:49:36 AM - ALAPTOP - GetFromHistoryAsync - WARNING: Unexpected error retrieving History from database: SQL logic error
no such table: history
5/19/2021 5:49:36 AM - ALAPTOP - PopulateHistoryAsync - WARNING: Error populating history panel: Object reference not set to an instance of an object.
5/19/2021 5:49:36 AM - ALAPTOP - PopulateFavouritesAsync - INFORMATION: Refreshing Favourites panel.
5/19/2021 5:49:36 AM - ALAPTOP - GetFromFavouritesAsync - WARNING: Unexpected error retrieving favourites from database: SQL logic error
no such table: favourites
5/19/2021 5:49:36 AM - ALAPTOP - PopulateFavouritesAsync - WARNING: Error populating favourites panel: Object reference not set to an instance of an object.
5/19/2021 5:49:36 AM - ALAPTOP - PopulateBlacklistAsync - INFORMATION: Refreshing blacklisted panel.
5/19/2021 5:49:36 AM - ALAPTOP - GetFromBlacklistAsync - WARNING: Unexpected error retrieving Blacklist from database: SQL logic error
no such table: blacklist
5/19/2021 5:49:36 AM - ALAPTOP - PopulateBlacklistAsync - WARNING: Error populating blacklist panel: Object reference not set to an instance of an object.
5/19/2021 5:49:37 AM - ALAPTOP - CheckInternetTimer_Tick - INFORMATION: Internet is working.
5/19/2021 5:49:38 AM - ALAPTOP - StartupTimer_Tick - INFORMATION: Error checking for updates: The request was aborted: Could not create SSL/TLS secure channel.
micscala commented 3 years ago

ok, mine doesn't have the these two lines:

MigrateOldBlacklistAsync - INFORMATION: Migrating Blacklist.xml to 'Reddit-Wallpaper-Changer.sqlite'. This is a one off task... 5/19/2021 5:49:36 AM - ALAPTOP - MigrateOldBlacklistAsync - INFORMATION: No blacklist.xml file to migrate

I think that an older version of the original program was indeed using .xml databases.

After uninstallling, try to empty completely your folder C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer, maybe there were remnants. Then starting over clean, and executing as administrator the first time, it should be able to create the necessary sql dbs. Are you sure you are running it as admin the first time?

aemyers commented 3 years ago

@micscala Thank you for your comparison! I've got it working now.

I'm not sure why the error occurred in the first place, but I was doing a shuffle of installing/uninstalling other forks so I most likely introduced an issue somewhere along the way.

I did have this folder structure left after uninstalling:

C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer>dir /s
 Volume in drive C is Windows
 Volume Serial Number is 1C14-7403

 Directory of C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer

05/19/2021  05:49 AM    <DIR>          .
05/19/2021  05:49 AM    <DIR>          ..
05/19/2021  05:49 AM    <DIR>          Logs
05/19/2021  05:49 AM                 0 Reddit-Wallpaper-Changer.sqlite
05/19/2021  05:49 AM    <DIR>          ThumbnailCache
               1 File(s)              0 bytes

 Directory of C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer\Logs

05/19/2021  05:49 AM    <DIR>          .
05/19/2021  05:49 AM    <DIR>          ..
05/20/2021  05:50 AM            81,449 RWC.log
               1 File(s)         81,449 bytes

 Directory of C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer\ThumbnailCache

05/19/2021  05:49 AM    <DIR>          .
05/19/2021  05:49 AM    <DIR>          ..
               0 File(s)              0 bytes

     Total Files Listed:
               2 File(s)         81,449 bytes
               8 Dir(s)  414,145,376,256 bytes free

I deleted the C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer folder entirely.

I then reinstalled RWC and the log on reinstall then looked like this:

5/20/2021 6:07:12 AM - ALAPTOP - RWC_Load - INFORMATION: ===================================================================================================================
5/20/2021 6:07:12 AM - ALAPTOP - RWC_Load - INFORMATION: Reddit Wallpaper Changer Version 1.0.15.0
5/20/2021 6:07:12 AM - ALAPTOP - RWC_Load - INFORMATION: RWC is starting.
5/20/2021 6:07:12 AM - ALAPTOP - RWC_Load - INFORMATION: RWC Interface Loaded.
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Auto Start: True
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Start In Tray: True
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Proxy Enabled: False
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: AppData Directory: C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Thumbnail Cache: C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer\ThumbnailCache
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Automatically check for updates: False
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Save location for wallpapers: C:\Users\Allen\Pictures\Saved Wallpapers
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Auto Save Favourite Wallpapers: False
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Auto Save All Wallpapers: False
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Grab Type: 0
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Selected Subreddits: earthporn
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Fade Effect: True
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Search Query: 
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Change wallpaper every 60 Minutes
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Number of detected displays: 2
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Position: Stretch
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Validate wallpaper size: False
5/20/2021 6:07:12 AM - ALAPTOP - LogSettings - INFORMATION: Wallpaper Info Popup: False
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Database 'Reddit-Wallpaper-Changer.sqlite' created successfully: C:\Users\Allen\AppData\Roaming\Reddit Wallpaper Changer\Reddit-Wallpaper-Changer.sqlite
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Successfully connected to database 'Reddit-Wallpaper-Changer.sqlite'
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Table 'version' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Table 'blacklist' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Index 'idx_blacklist' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Index 'idx_blacklist_date' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Table 'favourites' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Index 'idx_favourites' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Index 'idx_favourites_date' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Table 'history' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Index 'idx_history' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - ConnectToDatabaseAsync - INFORMATION: Index 'idx_history_date' successfully created.
5/20/2021 6:07:12 AM - ALAPTOP - BuildThumbnailCacheAsync - INFORMATION: Updating wallpaper thumbnail cache.
5/20/2021 6:07:12 AM - ALAPTOP - BuildThumbnailCacheAsync - INFORMATION: Wallpaper thumbnail cache updated.
5/20/2021 6:07:12 AM - ALAPTOP - PopulateHistoryAsync - INFORMATION: Refreshing History panel.
5/20/2021 6:07:12 AM - ALAPTOP - PopulateHistoryAsync - INFORMATION: History panel reloaded.
5/20/2021 6:07:12 AM - ALAPTOP - PopulateFavouritesAsync - INFORMATION: Refreshing Favourites panel.
5/20/2021 6:07:12 AM - ALAPTOP - PopulateFavouritesAsync - INFORMATION: Favourite wallpapers loaded.
5/20/2021 6:07:12 AM - ALAPTOP - PopulateBlacklistAsync - INFORMATION: Refreshing blacklisted panel.
5/20/2021 6:07:12 AM - ALAPTOP - PopulateBlacklistAsync - INFORMATION: Blacklisted wallpapers loaded.
5/20/2021 6:07:13 AM - ALAPTOP - CheckInternetTimer_Tick - INFORMATION: Internet is working.

Of note, I did not run RWC as an administrator after reinstall this time.

My assumption is that zero byte Reddit-Wallpaper-Changer.sqlite file was mucking things up.

Again, thank you! This version of RWC is actually usable at least. The original hangs in all sorts of nasty ways. I was very bummed when this one wasn't working either.