Helium314 / Local-NLP-Backend

Yet another network location backend for the UnifiedNLP/microG project
GNU General Public License v3.0
65 stars 4 forks source link

Déjà Vu database import: 'Error: file format unknown' #3

Closed sylph1o closed 2 years ago

sylph1o commented 2 years ago

Hi!

I had been using the Déjà Vu NLP backend until now and wished to import its database into Local NLP. The description of the 'Import data' option in the interface of Local NLP suggests that this is supported. However, the import fails with the message 'Error: file format unknown'.

Steps to reproduce

  1. Copy /data/data/org.fitchfamily.android.dejavu/databases/rf.db to a location accessible without root privileges.
  2. Open the configuration interface of Local NLP backend
  3. Select 'Import data'
  4. Select the file rf.db copied at step 1.
  5. Pick any option on how to handle emitters already existing in the local database, it makes no difference.
  6. Observe error message.

Is this import not supported? If it is, does anyone has ny idea as to the cause of the problem, or a possible solution?

Helium314 commented 2 years ago

Actually this is supposed to work... Which version are you using? There were some changes in the related code between the first beta and the current beta 3.

sylph1o commented 2 years ago

Sorry, I should have included that information.

Helium314 commented 2 years ago

Actually I just tested, and couldn't reproduce the issue in any of those versions...

Is your file really named rf.db? When, importing, only files ending with .db are loaded as database. All other endings are interpreted as text files... and it appears the file ending check fails in your case.

sylph1o commented 2 years ago

Is your file really named rf.db?

Yes, it is. Perhaps the file is somehow corrupted. Here it is. Can you reproduce the issue with this file?

Helium314 commented 2 years ago

This is weird.... it works perfectly fine for me. I suspect your phone may not report the real file name when importing. Could you try with this APK?

It's exactly the same as beta 3, but the error message will contain the full file path. Is there rf.db at the end if you try it?

Helium314 commented 2 years ago

Ok, maybe you don't need to try, I just found some issue with my method of determining the file name.

Helium314 commented 2 years ago

Could you check whether the import works with this: local-nlp-backend_1.2.0-beta.3-release_import_fix_attempt.zip

sylph1o commented 2 years ago

This last APK seems to be able to import my rf.db file:

As far as I am concerned, this perfectly solves the issue :slightly_smiling_face: . Thank you for being so responsive!

P.S. I'll let you decide if you want to close the issue or if you want me to test anything else.

Helium314 commented 2 years ago

No need for further testing, thanks!