Deepfish app didn't accept API key

Hi @jojo

I’ve tried your Deepfish app today. I registered for an API Key on deepl.com and successfully receiving one.

But when I paste the key into the Settings of your app and hit Save, then the Key would be rejected. The field remain empty then. And finally there is no connection to Deepl API.

Can you check this issue?

OS: 4.4.0.72
Device: Xperia 10 III
Deepfish: 2.0-3

Hey thank you very much for the feedback ! Do you know how to SSH into your phone ? If yes, you can go to $HOME/.local/share/org.jojo_/Deepfish/language.db , there should be an SQLite3 database there that is not empty.

Nevertheless, I will add some debug info so it’s easier for others to share their issues.

No problem, will take a look. Should I remove this database and reinstall the app?

There is no folder with org.jojo_ inside my home directory.

Ok then this is a bad start since upon entering the API key, it creates the database . I wonder what’s happening …

I reinstall now and try it again.

Nope, no database creation again.

Are you building from the source ? If so, could you try downloading the image from ? openrepos.net Deepfish | OpenRepos.net — Community Repository System

Nope, I just download and install via the OpenRepos. It’s just the command line version of this installation. I also download via GUI, but the issue still persists.

new public release will include the solutions i used to solve your issue (in case anyone else has this problem)

3 Likes

Thanks, meanwhile (with the same configuration as the author and with Deepfish 2.0-3 from Openrepos I got it working like this:

If you do not have yet sqlite3, then

devel-su
zypper install sqlite
exit
cd
cd .local/share
mkdir org.jojo_
chmod 700 org.jojo_
ln -s org.jojo_ harbour-deepfish org.jojo_
cd harbour-deepfish
mkdir Deepfish
cd Deepfish
 sqlite3 language.db <<'EOF'
> PRAGMA foreign_keys=OFF;
> BEGIN TRANSACTION;
> CREATE TABLE apiTokenTable(apiToken TEXT);
> INSERT INTO apiTokenTable VALUES('<your DeepL API key here>');
> COMMIT;
> EOF
sqlite3 language.db .dump >mydbbup.txt

Hope this helps to fix the bug, also. Thanks for this useful application, I do not need to use browser for DeepL anymore!

(and I am a user of the Vocabulary application for learning - support for it it would be welcome, as you have suggested)

1 Like

Hi thank you for adding that to the others !

I wasn’t aware we could not have sqlite, I was sure it came by default (i dont remember ever installing it).

Indeed this should help. The issue was on the default creation of the database. When I tried the solution with @playforvoices i created a default database with a default API token that he could overwrite.

Those two problems led me to fast forward one of the features I wanted to add: “free translation for all” . In the next update, everyone gets 65 words to translate, on me, and then you need to add your own API. So people that don’t need to translate that often can still benefit from the app.

The code is ready, only thing blocking me from releasing it is purely esthetic… As you see in the image bellow, I can’t manage to make the history of the translated words to fit in the screen. And I also did not find a way for the list to start bellow the header.

In the ListPage.qml of the componentgallery app (the default app from Jolla) they use a

        header: PageHeader {
            title: "List and menus"
        }

but that header: thing does not work on my side…

So if anyone has an idea on how to solve this:

1 Like

Set ‘wrapMode: Text.WordWrap’ for the entries to wrap if they are longer than one screen width (not sure if that’s what you mean about fitting on screen) and ‘anchors.top: titleHeader.bottom’ in the ListView should fix the overlap (might need moving the pageheader into flickable, to get the ‘header: PageHeader…’ version working it needs to be in ListView not outside)

3 Likes

Thx for helping to solve the problem !

Hi, the sqlite installation of mine was only because I needed to have the command line application to resolve the immediate issue. Your application’s dependencies on the sqlite’s (python?) libraries will make sqlite transparent to the end user, I presume (I hope). You should also consider which folder your application is using - I could not get it working before I created myself the symbolic link harbour-deepfish. I am not sure this is your intention when installing from Openrepos and not from Jolla store. Actually, I do not know is there such a rule but yourself mention org.jojo_ as folder name. It does not work for me. Thanks again for the great work.

This is interesting.

I did not submit the app to the Jolla Store yet, as it still does not follow all guidelines for the store (such as retrial if network error, erase all comments and tests from the code, support for various devices, etc…).

Regarding this, I only followed the Organization name standards suggested here by @vige . I based the name on my username and .org after seeing other folders with the same structure on my device.

One thing I learned thanks to you, is to have the app tested by others before releasing it. Before this last release I got it tested by three members (that never had the app before) so I was sure it would work.

If it still does not work for you, send me a message and I will find a solution.