gustavklopp / LingL

clone of lingq to learn new language
GNU General Public License v3.0
97 stars 9 forks source link

The application requires macOS 11.4 or later. #32

Open Samuihasu opened 3 years ago

Samuihasu commented 3 years ago

It seems that when you were helping chengxicn on their problem, you made the program require masOS 11.4. Was this intended or an accident? For what I can see the most of the work happens in the browser so I'm not seeing why earlier versions of masOS can't be used.

Asking before I try to do the other method which I'm not really sure on how to do...

gustavklopp commented 3 years ago

I'm not accustomed to macOS. I thought softwares made for Mac Sur were compatible with softwares made for Mac Catalina. Which error do you see when launching it?

For what I can see the most of the work happens in the browser

It's half of the work. It's like when you visit any websites with your browser: webpages are hosted by a server working on a computer.
We need to launch a local server (a very light version of a server), and the browser then visits the webpages hosted by this local server.

Samuihasu commented 3 years ago

Which error do you see when launching it?

When I double click on the application it says in a popup box: You can’t use this version of the application “LingL-2021.7.6” with this version of macOS. You have macOS 10.15.6. The application requires macOS 11.4 or later.

gustavklopp commented 3 years ago

Programs built on Sur aren't compatible with Catalina. I didn't know that... That's unfortunate. You don't intend to upgrade to Sur?

Samuihasu commented 3 years ago

You don't intend to upgrade to Sur?

I'm on an older mac so no. Will the other method work for me?

gustavklopp commented 3 years ago

I'm on an older mac so no.

Maybe it's the good time to switch to Linux since your Mac is now vulnerable to security breaches. And it will run and be updated forever, even on antique Mac.

Will the other method work for me?

The other method is more for developers.

The other possibility is to use Wine: it allows to run Windows program on Mac (and Linux). https://winebottler.kronenberg.org/

Samuihasu commented 3 years ago

Wine does not work on Catalina. Looks like I'm sticking with the original LWT. Thanks for responding so quickly.

gustavklopp commented 3 years ago

Wine does not work on Catalina.

You're sure? Apparently you can install it with homebrew (i didn't try it myself): https://apple.stackexchange.com/a/380068

Samuihasu commented 3 years ago

Can you make a video of you installing it through the method "Use the built-in server inside Django:"? I stuck at the error: ModuleNotFoundError: No module named 'mathfilters'

gustavklopp commented 3 years ago

You need to install all the modules required: pip install -r requirements.txt (You need pip of course, which is a Python modules manager: https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

)

It will install (among all the others) django-mathfilters

I'll try with a video later but my macOS virtual machine is very slow (especially with Sur)...

chengxicn commented 3 years ago

Tried pip install -r requirements.txt ,got error at the end :

Collecting mysqlclient==2.0.3 Using cached mysqlclient-2.0.3.tar.gz (88 kB) ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j3/kg98frrj721964wc_h_13z800000gq/T/pip-install-1rwvy8a5/mysqlclient_543ad1bd72bc469b8652d60bdfaafb24/setup.py'"'"'; file='"'"'/private/var/folders/j3/kg98frrj721964wc_h_13z800000gq/T/pip-install-1rwvy8a5/mysqlclient_543ad1bd72bc469b8652d60bdfaafb24/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/j3/kg98frrj721964wc_h_13z800000gq/T/pip-pip-egg-info-lgv12tor cwd: /private/var/folders/j3/kg98frrj721964wc_h_13z800000gq/T/pip-install-1rwvy8a5/mysqlclient_543ad1bd72bc469b8652d60bdfaafb24/ Complete output (15 lines): /bin/sh: mysql_config: command not found /bin/sh: mariadb_config: command not found /bin/sh: mysql_config: command not found Traceback (most recent call last): File "", line 1, in File "/private/var/folders/j3/kg98frrj721964wc_h_13z800000gq/T/pip-install-1rwvy8a5/mysqlclient_543ad1bd72bc469b8652d60bdfaafb24/setup.py", line 15, in metadata, options = get_config() File "/private/var/folders/j3/kg98frrj721964wc_h_13z800000gq/T/pip-install-1rwvy8a5/mysqlclient_543ad1bd72bc469b8652d60bdfaafb24/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/private/var/folders/j3/kg98frrj721964wc_h_13z800000gq/T/pip-install-1rwvy8a5/mysqlclient_543ad1bd72bc469b8652d60bdfaafb24/setup_posix.py", line 31, in mysql_config raise OSError("{} not found".format(_mysql_config_path)) OSError: mysql_config not found mysql_config --version mariadb_config --version mysql_config --libs

WARNING: Discarding https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz#sha256=f6ebea7c008f155baeefe16c56cd3ee6239f7a5a9ae42396c2f1860f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement mysqlclient==2.0.3 (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3) ERROR: No matching distribution found for mysqlclient==2.0.3

gustavklopp commented 3 years ago

I've removed the mysqlclient dependency. Please try today's version.

Big news: I've created a Docker version! Please follow the instructions if you want to try it.

Samuihasu commented 3 years ago

I've removed the mysqlclient dependency. Please try today's version.

Big news: I've created a Docker version! Please follow the instructions if you want to try it.

Using the Docker worked but I can't import LWT db. Posted error here: https://github.com/gustavklopp/LingL/issues/28 This is LingL Version 2021.07.23

gustavklopp commented 3 years ago

Can you upload your LWT sql.gz file please?

Samuihasu commented 3 years ago

lwt-backup-2021-08-01-16-27-49.sql.gz In case it matters: Browser: FireFox When trying to import, I had to change the options to all files for the popup to allow me to select the right file. Even though it said "*.sql.gz " in the options, it did not recognized my file for some reason

gustavklopp commented 3 years ago

There's a bug in LWT apparently where 2 texts can have the same title. I've implemented a warning when this is happening. In your backup file for example, test, Reading 1 and Reading 2 are in double. I've fixed your backup file, deleting this duplicates: lwt-backup-2021-08-01-16-27-49_FIXED.sql.gz

But importing your file may take some time: You've got about 470 000 saved words in total!!!

gustavklopp commented 3 years ago

I will increase the import of wordtags. This is the thing which is slowing the import in fact - the 470 000 words import is not so slow finally.

Samuihasu commented 3 years ago

I should really fix that as I only use one language now lol.
Wait, even though I got another error, it seems to have imported my text and languages but not my terms Error: UNIQUE constraint failed: texts_texttags.texts_id, texts_texttags.texttags_id

Also seems to archive all my texts and add 'src links' to all of them lol. Will update once this is done archiving. UPDATE: -page would never finish loading so created a new text with the same chapter. This page also won't finish loading so refreshed it the new text was there. -Also noticed that my terms keep going up every few minutes so I think the program is adding them, slowly. Went from 2,888 to 5,760 -Surprised there isn't a way to import terms -Is there a way to combine two words? For Mandarin, "words are mostly composed of only one character" is not true so if there isn't a way to drag two or more characters together, this tool wont work for Asian languages.

gustavklopp commented 3 years ago

That's a lot of questions, thanks for your enthusiasm! It would be more practical for me to open an issue for each point.

I've uploaded the today version: LingL is able now to process MASSIVE database like yours (>400´000 words) thanks to parallel processing. It still takes some time but you process it only once!

chengxicn commented 3 years ago

When I tried docker pull gustavklopp/lingl ,it seems no update ?

 % docker pull gustavklopp/lingl:latest
latest: Pulling from gustavklopp/lingl
Digest: sha256:d9a40b51638846725819a1555b643cccab66fec4f5197748f3519ea962e2b16c
Status: Image is up to date for gustavklopp/lingl:latest

Sorry, I checked docker hub, It do updated. It's my local issue. Let me try to fix it and continue test the issues.

gustavklopp commented 3 years ago

Sorry, I've forgotten to build the image... You can pull again.