Code Monkey home page Code Monkey logo

lingl's People

Contributors

gustavklopp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lingl's Issues

Error when importing LWT db or installing demo

import lwt database :

DeserializationError at /backuprestore/
Problem installing fixture '/Applications/LingL-0.0.0.app/Contents/MacOS/lib/media/editedOwner_ci.yaml': 
Request Method:	POST
Request URL:	http://127.0.0.1:8000/backuprestore/
Django Version:	3.2.3
Exception Type:	DeserializationError
Exception Value:	
Problem installing fixture '/Applications/LingL-0.0.0.app/Contents/MacOS/lib/media/editedOwner_ci.yaml': 
Exception Location:	/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/serializers/pyyaml.py, line 80, in Deserializer
Python Executable:	/Applications/LingL-0.0.0.app/Contents/MacOS/LingLibre
Python Version:	3.8.10
Python Path:	
['/Applications/LingL-0.0.0.app/Contents/MacOS/lib/library.zip',
 '/Applications/LingL-0.0.0.app/Contents/MacOS/lib']
Server time:	Tue, 22 Jun 2021 04:35:28 +0000


Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/backuprestore/

Django Version: 3.2.3
Python Version: 3.8.10
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'lwt',
 'tags_input',
 'mathfilters',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'crispy_forms']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/serializers/pyyaml.py", line 76, in Deserializer
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/yaml/__init__.py", line 114, in load
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/yaml/constructor.py", line 49, in get_single_data
    <source code not available>
  File "yaml/_yaml.pyx", line 707, in yaml._yaml.CParser.get_single_node
    <source code not available>
  File "yaml/_yaml.pyx", line 726, in yaml._yaml.CParser._compose_document
    <source code not available>
  File "yaml/_yaml.pyx", line 905, in yaml._yaml.CParser._parse_next_event
    <source code not available>

The above exception (mapping values are not allowed in this context
  in "/Applications/LingL-0.0.0.app/Contents/MacOS/lib/media/editedOwner_ci.yaml", line 6, column 1366) was the direct cause of the following exception:
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    <source code not available>
  File "/Users/lingl/lingl/LingL/lwt/views/backuprestore.py", line 173, in backuprestore
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/management/__init__.py", line 181, in call_command
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 78, in handle
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 123, in loaddata
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/management/commands/loaddata.py", line 181, in load_label
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/serializers/pyyaml.py", line 80, in Deserializer
    <source code not available>

Exception Type: DeserializationError at /backuprestore/
Exception Value: Problem installing fixture '/Applications/LingL-0.0.0.app/Contents/MacOS/lib/media/editedOwner_ci.yaml': 


install LingL Demo:


MultipleObjectsReturned at /backuprestore/
get() returned more than one Languages -- it returned 13!
Request Method:	POST
Request URL:	http://127.0.0.1:8000/backuprestore/
Django Version:	3.2.3
Exception Type:	MultipleObjectsReturned
Exception Value:	
get() returned more than one Languages -- it returned 13!
Exception Location:	/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/db/models/query.py, line 439, in get
Python Executable:	/Applications/LingL-0.0.0.app/Contents/MacOS/LingLibre
Python Version:	3.8.10
Python Path:	
['/Applications/LingL-0.0.0.app/Contents/MacOS/lib/library.zip',
 '/Applications/LingL-0.0.0.app/Contents/MacOS/lib']
Server time:	Tue, 22 Jun 2021 04:39:16 +0000

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/backuprestore/

Django Version: 3.2.3
Python Version: 3.8.10
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'lwt',
 'tags_input',
 'mathfilters',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'crispy_forms']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    <source code not available>
  File "/Users/lingl/lingl/LingL/lwt/views/backuprestore.py", line 221, in backuprestore
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
    <source code not available>
  File "/Users/lingl/.pyenv/versions/venv3810/lib/python3.8/site-packages/django/db/models/query.py", line 439, in get
    <source code not available>

Exception Type: MultipleObjectsReturned at /backuprestore/
Exception Value: get() returned more than one Languages -- it returned 13!

ePub reading interface not working?

How am I supposed to read and annotate words from an ePub?

I uploaded my Lord of the Rings epub in german. It shows 0 words to do, there are no words in blue, and when I make a large selection it unhelpfully asks whether I want to ""LingLibrify" this text of the webpage?", which does nothing when I say yes.

Language filter always filters out everything

On the text list page after checking any item in the language filter, the list becomes empty.
Before:
2021-05-03_16-15_initial
After clicking on language checkbox:
2021-05-03_16-16_after
Expected to see a list of texts in chosen language:
image

As a user, I just need to be able to switch the target language. So it would suffice to have the text list always display texts in current target language.

custom parsing support

Hi,

Great software so far.

It would be extremely useful to add custom parsing option so that the user can highlight couple of neighboring words and override the default word based parsing. In some languages such as arabic, the phrases constitute a great fraction, and take a new meaning than individual words does.

unknown locale: en_150

When I create an account, I get an error that prevents me from continuing.

I'm on Windows 10.

ValueError at /

unknown locale: en_150
Request Method: | GET
-- | --
http://127.0.0.1:8000/
3.2
ValueError
unknown locale: en_150
C:\Users\bureau\AppData\Local\Programs\Python\Python38\lib\locale.py, line 499, in _parse_localename
C:\Users\Edoreld\Downloads\exe.win-amd64-3.8\LingLibre.exe
3.8.9
['C:\\Users\\Edoreld\\Downloads\\exe.win-amd64-3.8',  'C:\\Users\\Edoreld\\Downloads\\exe.win-amd64-3.8\\lib\\library.zip',  'C:\\Users\\Edoreld\\Downloads\\exe.win-amd64-3.8\\lib']
Fri, 09 Jul 2021 17:00:10 +0000

<!--EndFragment-->
</body>
</html>

image

No 'save' button in text detail page

I can't save changes to existing text because there is no 'save' button on text detail page
https://vimeo.com/544552933

  1. In text list click 'edit' icon on any row
    Edit Text : Modify the text page appears where text can be edited but no button to save the edits.
    Expected save button to be present, just like on New Text page.

Is the Windows installer version of this no longer available?

it does not appear in the releases version (yet does in the video channel accompanying this project).

!!! READ THEN DELETE THE TEXT BELOW by replacing it with your writing of the issue!!!

Check that the issue hasn't been posted before
Go to https://github.com/gustavklopp/LingL/issues, delete the placeholder text ("is:issue is:open") and search your issue.

Check that you have the latest release
Your bug may have been resolved in the latest release. Check on https://github.com/gustavklopp/LingL/releases that you have the latest release for your system.

Paste the Debug page
Copy-Paste the whole debug page on https://pastebin.com/ and paste the link to this Pastebin in your issue.

(Optional) Upload the file
If your issue concerns restoring from a previous backup file or importing from the backup of other softwares like LWT, you may upload (optional) the file in your issue (You can simply drag and drop the file in the issue's text).

Importing long texts fails in unhelpful manner

I tried importing a long text and it crashed with the error "Request body exceeded settings.DATA_UPLOAD_MAX_MEMORY_SIZE". As a user, how am I supposed to know what the limit is when importing texts?

It would be helpful if there was a feature like on LWT where you can import a long text, and it splits the long text automatically into smaller texts.

Words marked as "known" in one text aren't also considered known in new texts.

I used LingL to process a short text, marking some words as known. I then copied and pasted part of this into a new text, and all of the words in the new text again had status = unknown, even though they should have been marked as known as I'd already seen them in the first text.

Initial text:

image

New text:

All words are again marked as unknown even though the exact same words were processed in the first text:

image

Expected behavior

The words that were marked as known in the first text should have again been known in the second text; they're the same word.

Notes:

  • This is LingL Version 2021.08.01 (commit 7813d8aaeec5ec65f56 = master, cloned from source)
  • running the django server on mac

Dictionary frame not showing up.

Following the latest release I can finally read the texts, however, the lower frame where the word definition is shown is not displaying.
image

Same happens on both chrome and firefox, although chrome just displays a sad emoji. If I click the "learn more" button in firefox, it takes me to this page

Clicking the "open in new window" button takes me to the following page 404 error page:
image

Question about repository age

Simply put, I'm reporting a bug to GitHub because their website is displaying weird dates on releases and commits ( for example, your releases from 8 days ago show up as being 1 month old here).

So I wanted to confirm the age of the first commits in this repo, see:
image
image

So according to it, your first commits in this repo happened 4 years ago. Your other repos all show up as being at least 6 years old, so I'd like to know about that too.

Thanks.

Can't use imported dictionary

Imported a LWT db, it shows
image

Then create a new text, but all the words in the text are blue,all the statistics are 0

image

To Do counter does not take into account repeated words

The TO DO counter counts the number of words, without taking into account the fact that the same word can occur several times in the text and it needs to be processed only once.
To demonstrate this issue:

  1. create a new English text with the following content:
    A A A
    and click save
    image
  2. Click read icon on created text
    To Do counter says 3
    expected 1
    image

LingLibre windows (standalone) error

Hi, I saw your post back on reddit and decided to check how the LingLibre is working and whether it's a good alternative to LWT.
This is what shows up when trying to launch it on Windows.

image

I'll try the built-in Django server instead, but I couldn't get the standalone executable to work.

Thanks for the attention.

The application requires macOS 11.4 or later.

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...

Translate to Chinese seems has a little problem.

Check that the issue hasn't been posted before
Go to https://github.com/gustavklopp/LingL/issues, delete the placeholder text ("is:issue is:open") and search your issue.

Done

Check that you have the latest release

Done, I git clone it.

Paste the Debug page
Copy-Paste the whole debug page on https://pastebin.com/ and paste the link to this Pastebin in your issue.

https://pastebin.com/xnDi1Tiz

(Optional) Upload the file
If your issue concerns restoring from a previous backup file or importing from the backup of other software like LWT, you may upload (optional) the file in your issue (You can simply drag and drop the file in the issue's text).


I found that it's because the query URL contains a space. I replace it with another dictionary, and it's done.

Report error when un-archive

After imported lwt db, all the texts were archived. (It seems no batch un-archived option ๏ผ‰

One by one click un-archived,Some text un-archived succeed, but one text reports error :


IntegrityError at /text_list/
UNIQUE constraint failed: sentences.text_id, sentences.order, sentences.owner_id
Request Method:	GET
Request URL:	http://127.0.0.1:8000/text_list/?unarchive=328
Django Version:	3.2.3
Exception Type:	IntegrityError
Exception Value:	
UNIQUE constraint failed: sentences.text_id, sentences.order, sentences.owner_id
Exception Location:	/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py, line 423, in execute
Python Executable:	/Applications/LingL-2021.6.23.app/Contents/MacOS/LingLibre
Python Version:	3.8.10
Python Path:	
['/Applications/LingL-2021.6.23.app/Contents/MacOS/lib/library.zip',
 '/Applications/LingL-2021.6.23.app/Contents/MacOS/lib']
Server time:	Thu, 24 Jun 2021 16:12:53 +0000

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/text_list/?unarchive=328

Django Version: 3.2.3
Python Version: 3.8.10
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'lwt',
 'tags_input',
 'mathfilters',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'crispy_forms']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
    <source code not available>

The above exception (UNIQUE constraint failed: sentences.text_id, sentences.order, sentences.owner_id) was the direct cause of the following exception:
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    <source code not available>
  File "/Users/lingl/lingl/LingL/lwt/views/_nolang_redirect_decorator.py", line 15, in wrap
    <source code not available>
  File "/Users/lingl/lingl/LingL/lwt/views/text.py", line 448, in text_list
    <source code not available>
  File "/Users/lingl/lingl/LingL/lwt/views/_utilities_views.py", line 430, in splitText
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/query.py", line 453, in create
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/base.py", line 726, in save
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/base.py", line 763, in save_base
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/base.py", line 868, in _save_table
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/base.py", line 906, in _do_insert
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/query.py", line 1270, in _insert
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1416, in execute_sql
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/utils.py", line 98, in execute
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
    <source code not available>
  File "/Users/lingl/.pyenv/versions/3.8.10/envs/venv3810/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 423, in execute
    <source code not available>

Exception Type: IntegrityError at /text_list/
Exception Value: UNIQUE constraint failed: sentences.text_id, sentences.order, sentences.owner_id

TemplateSyntaxError at /text_detail/ when trying to create a new text.

On the latest release (the one from yesterday), when I select any of the predefined language templates (French, Portuguese, German, any of them) and click "New Text" (as seen below)
image

I get an error, that can be seen on the screenshot or the zipped HTML file below
image

TemplateSyntaxError at text_detail.zip

Also, if we're to keep testing this and reporting the errors, I'd suggest you to come up with some versioning scheme so that we can refer to the specific releases, bc as it is I already see myself coming back and forth from different versions to see if a specific issue has been resolved, and referring to them requires a specific versioning template for reference.

Fresh install, created new language (spanish) but can't edit it.

Clicking on the link to edit the language (http://127.0.0.1:8000/language_detail/?edit=14) gave the following message:

>list index out of range

Request Method: | GET
-- | --
http://127.0.0.1:8000/language_detail/?edit=14
3.2.4
IndexError
list index out of range
/Users/jeff/Documents/Languages/LingL/.venv/lib/python3.9/site-packages/django/db/models/query.py, line 318, in __getitem__
/Users/jeff/Documents/Languages/LingL/.venv/bin/python
3.9.13
['/Users/jeff/Documents/Languages/LingL',  '/Library/Frameworks/Python.framework/Versions/3.9/lib/python39.zip',  '/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9',  '/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload',  '/Users/jeff/Documents/Languages/LingL/.venv/lib/python3.9/site-packages']
Wed, 26 Oct 2022 06:39:01 +0000

full paste is on pastebin

Thanks!

This is interesting because on the home page, there is a dropdown listing all the languages I have (spanish and german), and the spanish element does have an ID of 14.

Slow on MacOS

I installed the app using Docker but using it is difficult because it is really slow. I am waiting around 30 seconds after clicking a button to go to the next page. If I want to add a new text, I get stuck:
image
Nothing happens and I can't proceed. I'm using an M1 Macbook Air running Big Sur.

Does not work on MacOS Big sur

MacOS Big sur 11.4

MacBook-Pro ~ % /Users/i/Downloads/exe.macosx-10.15-x86_64-3.8/LingLibre ; exit;
Traceback (most recent call last):
File "/Users/lingl/.pyenv/versions/3.8.9/lib/python3.8/site-packages/cx_Freeze/initscripts/startup.py", line 81, in run
File "/Users/lingl/.pyenv/versions/3.8.9/lib/python3.8/site-packages/cx_Freeze/initscripts/Console.py", line 36, in run
File "LingL_app.py", line 6, in
File "/Users/lingl/.pyenv/versions/3.8.9/lib/python3.8/tkinter/init.py", line 36, in
ImportError: dlopen(/Users/i/Downloads/exe.macosx-10.15-x86_64-3.8/lib/_tkinter.cpython-38-darwin.so, 2): Library not loaded: /usr/local/opt/tcl-tk/lib/libtcl8.6.dylib
Referenced from: /Users/i/Downloads/exe.macosx-10.15-x86_64-3.8/lib/_tkinter.cpython-38-darwin.so
Reason: image not found
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

local variable 'savedlanguage' referenced before assignment

Steps to reproduce:

  1. Clone repo @ 54983b9
  2. Follow the instructions in the README under 2.2. Use the built-in server inside Django:
  3. Login
  4. Choose German as language
  5. Click on save

Stacktrace:

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/language_detail/?new=0

Django Version: 3.2.3
Python Version: 3.9.2
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.humanize',
 'lwt',
 'tags_input',
 'mathfilters',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'crispy_forms']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
  File "C:\Users\Edoreld\Documents\LingL\venv\lib\site-packages\django\core\handlers\exception.py", line 47, in inner
    response = get_response(request)
  File "C:\Users\Edoreld\Documents\LingL\venv\lib\site-packages\django\core\handlers\base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\Edoreld\Documents\LingL\venv\lib\site-packages\django\contrib\auth\decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "C:\Users\Edoreld\Documents\LingL\lwt\views\language.py", line 117, in language_detail
    setter_settings_cookie_and_db('currentlang_id', savedlanguage.id, request)

Exception Type: UnboundLocalError at /language_detail/
Exception Value: local variable 'savedlanguage' referenced before assignment

Can't login with the username I created.

Idk if I'm doing something wrong.

What I know is that yesterday I extracted LingLibre to a location in my PC, I ran it and registered an user, then I started adding texts to it.

Today I turned the computer on, launched LingLibre and it is not recognizing the username I registered yesterday.
image
image

I'd also like to know where the user data is stored, so I can possibly back it up.

"Help" Button goes to homepage

Paste the Debug page
Sorry, where is this debug page located? I'd reccomend making this very obvious to help users write good reports :)

Hiya,

The "help" button on the Home menu, and associated "help" links appear to go just to the front page.

Is the help page currently unimplemented?

lingl-2021-08-02_07.22.12.mp4

When creating a language, how should I fill mandatory fields?

I'm having an issue with the mandatory fields when creating a language. See:

image
I don't use anki. So even though there's a documentation for it available in the internet, it is not interesting for me to go there and learn what these templates are all about if I'm not using them.

The fields pertaining the EOL character thing are also mandatory.

I am opening this issue because it's not quite clear to me how should I fill these fields in order to create a new language.

Fresh install, creating first text, got "django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet." exception

Issue not opened before. Just cloned the repo today.

Paste the Debug page
debug pastebin

Start of the error message

RemoteError at /text_detail/
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/managers.py", line 245, in serve_client
    request = recv()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/connection.py", line 256, in recv
    return _ForkingPickler.loads(buf.getbuffer())
  File "/Users/jeff/Documents/Languages/LingL/lwt/views/__init__.py", line 5, in <module>
    from lwt.views.homepage import *
  File "/Users/jeff/Documents/Languages/LingL/lwt/views/homepage.py", line 21, in <module>
    from lwt.models import *
  File "/Users/jeff/Documents/Languages/LingL/lwt/models.py", line 26, in <module>
    from django.contrib.auth.models import AbstractUser, UserManager
  File "/Users/jeff/Documents/Languages/LingL/.venv/lib/python3.9/site-packages/django/contrib/auth/models.py", line 3, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/Users/jeff/Documents/Languages/LingL/.venv/lib/python3.9/site-packages/django/contrib/auth/base_user.py", line 48, in <module>
    class AbstractBaseUser(models.Model):
  File "/Users/jeff/Documents/Languages/LingL/.venv/lib/python3.9/site-packages/django/db/models/base.py", line 108, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/Users/jeff/Documents/Languages/LingL/.venv/lib/python3.9/site-packages/django/apps/registry.py", line 253, in get_containing_app_config
    self.check_apps_ready()
  File "/Users/jeff/Documents/Languages/LingL/.venv/lib/python3.9/site-packages/django/apps/registry.py", line 136, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.

The app was running fine before I created my initial text.

Thank you! I haven't moved to a new screen, I'll see if the text has somehow been processed anyway. Cheers! jz

Backup/Restore/Empty Database should be allowed only to superusers

Regular users are presented with link Backup/Restore/Empty Database, can follow this link and make use of functions like backup, restore from backup, install demo database, empty database. These functions should not be allowed for non superuser because they affect all users. The link Backup/Restore/Empty Database should only be displayed for superusers, all requests GET /backuprestore/ and POST /backuprestore/ should be forbidden for non superusers.

Why language from "Origin lang code" field is being added to 'My Languages' during sign up?

After recent changes the drop-down list 'Origin lang code' on the sign up page became very limited. Previously new user could choose any language under the sun, but now only a few select languages are available.
image

During the sign up process the language from 'Origin lang code' field gets added to the 'My languages' list.
image

Maybe it would be more appropriate to ask for both languages during sign up and add only the target language?
image

Install on Ubuntu

Hi,

Currently trying to install on Ubuntu 22.04, using 2.2 (built in with Django).
Got stuck on this error:

ModuleNotFoundError: No module named 'test.test_sys_settrace'

Which happens when running the
python manage.py
commands.

The terminal is situated in the same folder as the manage.py file.
Tried adding an empty init.py file but it didn't help.

Running
pip install -r requirements.txt
returns that all requirements are already satisfied.

What can I try next?

Filter 'Last time open' applied inconsistently

Filter 'Last time open' works differently :

  • if no time chosen after text list is first opened then all texts are displayed.
  • if no time chosen after unchecking any item in the filter then no text is displayed.

After opening text list page:
image

After clicking on checkbox beside text '< 1 month ago' and unchecking it again:
image

As a user, I never want everything to be filtered out, so the first option (to display all texts) would be preferable.

Docker Version can not run on local network

DisallowedHost at /

Invalid HTTP_HOST header: '192.168.8.109:8000'. You may need to add '192.168.8.109' to ALLOWED_HOSTS.
Request Method: GET
http://192.168.8.109:8000/
3.2.4
DisallowedHost
Invalid HTTP_HOST header: '192.168.8.109:8000'. You may need to add '192.168.8.109' to ALLOWED_HOSTS.
/root/.pyenv/versions/3.9.0/lib/python3.9/site-packages/django/http/request.py, line 149, in get_host
/root/.pyenv/versions/3.9.0/bin/python3.9
3.9.0
['/app', '/root/.pyenv/versions/3.9.0/bin', '/root/.pyenv/versions/3.9.0/lib/python39.zip', '/root/.pyenv/versions/3.9.0/lib/python3.9', '/root/.pyenv/versions/3.9.0/lib/python3.9/lib-dynload', '/root/.pyenv/versions/3.9.0/lib/python3.9/site-packages']
Sun, 29 May 2022 08:15:28 +0000

It has no option to export to Anki

I used Django to build LingL in Windows 10, and it worked fine.The only drawback is the inability to export to Anki.

Here is the record that appears in the browser.

AttributeError at /export2anki_exporter/

'NoneType' object has no attribute 'grouper_of_same_words_for_this_word'

Request Method: 	POST
Request URL: 	http://127.0.0.1:8000/export2anki_exporter/
Django Version: 	3.2.4
Exception Type: 	AttributeError
Exception Value: 	

'NoneType' object has no attribute 'grouper_of_same_words_for_this_word'

Exception Location: 	H:\MyNotes\English\LingL\Scripts\LingL\lwt\views\export2anki_exporter.py, line 79, in export2anki_exporter
Python Executable: 	H:\MyNotes\English\LingL\Scripts\python.exe
Python Version: 	3.9.7
Python Path: 	

['H:\\MyNotes\\English\\LingL\\Scripts\\LingL',
 'C:\\Users\\GotBook\\AppData\\Local\\Programs\\Python\\Python39\\python39.zip',
 'C:\\Users\\GotBook\\AppData\\Local\\Programs\\Python\\Python39\\DLLs',
 'C:\\Users\\GotBook\\AppData\\Local\\Programs\\Python\\Python39\\lib',
 'C:\\Users\\GotBook\\AppData\\Local\\Programs\\Python\\Python39',
 'H:\\MyNotes\\English\\LingL',
 'H:\\MyNotes\\English\\LingL\\lib\\site-packages']

Server time: 	Sun, 16 Jan 2022 12:49:59 +0000

On 'New Text' page 'language' drop-down list contains languages owned by 'lingl'

image

  1. Make sure there are some languages in 'lingl' account
  2. Log in as a regular user
  3. Click New Text
    As a result, in the drop-down list 'Language' there are languages that actually defined in the 'lingl' account (alongside with languages defined in the current user account). If the user saves a text with any language from the 'lingl' account, then he is not going to be able to see it in the texts list because 'Language' filter always filters texts by languages defined in the user account.
    It is expected to see, in the drop-down list 'Language', only languages that are defined in the current user account.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.