Kodi Community Forum

Full Version: where is my database?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys,

I am having a strange problem.

I wrote a scaper. The scraper puts the data into a sqlite database.

It works beautifully, I see all the debug data running by from the xmbc.log. Creating database, updating database, everything is just fine.

I close XBMC. Open it again and sure, I have a database, the scraper updates the database.

But where is the databaseHuh? Everything works just fine and I even build in debug code to tell me where the database is written: /Users/markvisser/Library/Application Support/XBMC/addons/script.infojunkie/scraper.db

but..... no file there...

Any ideas?
wkr,
Mark
usually, add-on data is stored in /Users/<your_user_name>/Library/Application Support/XBMC/userdata/addon_data/
so go have a look there. :-)

storing data inside the addon folder itself wouldn't make sense anyway,
as it will be deleted on each update of the add-on.
Indeed, that does make sense... However, it is not there.

I now searched the entire HD. Nothing. But the script in XBMC finds the database and is happely writing to it... strange Undecided
Found it !!

All files that are created are saved in /Applications
Kinda makes sense since XBMC is in that directory. It just makes the files in the root there.
That's because you chose to run XBMC in portable mode (via the -p commandline flag). In this case all data is saved in the portable_data subfolder of wherever XBMC is.
if that is the case, it is not intentionally. I start XBMC by clicking on the XBMC.app in my application folder. I give it no parameters.
Apologies, somehow I got the idea you were on win32. Probably as most users that ask similar questions are on win32!

My next guess is you're running a nightly with external python, and are using os.getcwd() to get the path to your scraper database rather than using the xbmcaddon module to get the correct paths?

Cheers,
Jonathan
:-) correct. I used os.getcwd(). I wrote the scraper outside XBMC and I am now trying to integrate it in XBMC. I found another wiki article about the XBMC library modules so the next step is learning the XBMC environment. :-) Step by step...

wkr,
Mark