where is my database?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
turtle2 Offline
Junior Member
Posts: 6
Joined: May 2011
Reputation: 0
Post: #1
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 databaseConfused? 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
find quote
ronie Offline
Team-XBMC Member
Posts: 8,986
Joined: Jan 2009
Reputation: 147
Post: #2
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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
turtle2 Offline
Junior Member
Posts: 6
Joined: May 2011
Reputation: 0
Post: #3
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
find quote
turtle2 Offline
Junior Member
Posts: 6
Joined: May 2011
Reputation: 0
Post: #4
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.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,689
Joined: Oct 2003
Reputation: 169
Post: #5
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.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
turtle2 Offline
Junior Member
Posts: 6
Joined: May 2011
Reputation: 0
Post: #6
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.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 25,689
Joined: Oct 2003
Reputation: 169
Post: #7
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

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
turtle2 Offline
Junior Member
Posts: 6
Joined: May 2011
Reputation: 0
Post: #8
:-) 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
find quote