Code Monkey home page Code Monkey logo

phkhanhtrinh23 / translation_layoutrecovery Goto Github PK

View Code? Open in Web Editor NEW
37.0 3.0 5.0 41.41 MB

This is a project that translates a .pdf file, preserving the original layout of that .pdf file. [UPDATED] We have achieved the Second Prize of the Cinnamon AI Bootcamp 2023.

Home Page: https://youtu.be/7ua89iycdoU

Python 83.45% Shell 0.12% TypeScript 16.01% CSS 0.31% JavaScript 0.10%
machine-translation easyocr nextjs paddleocr postgresql docker-compose firebase

translation_layoutrecovery's Issues

Error on translation

After overcoming some errors #11, apparently the app works, it allows you to create a user and upload a pdf file, however, when I press the translate button I constantly receive an error:
image
In the console the messages indicate these POST failures:

translation-app-frontend  | - event compiled successfully in 36 ms (288 modules)
translation-app-backend   | [26/Feb/2024 19:17:00] "GET /history/pdfT HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:17:03] "GET /pdf/pdfT?type=all HTTP/1.1" 200 30
translation-app-backend   | [26/Feb/2024 19:17:05] "GET /pdf/pdfT?type=all HTTP/1.1" 200 30
translation-app-backend   | [26/Feb/2024 19:17:08] "POST /user/pdfT HTTP/1.1" 200 255
translation-app-backend   | [26/Feb/2024 19:17:54] "POST /create HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:17:54] "POST /translation HTTP/1.1" 400 45
translation-app-backend   | [26/Feb/2024 19:34:16] "POST /create HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:34:16] "POST /translation HTTP/1.1" 400 45
translation-app-backend   | [26/Feb/2024 19:35:55] "POST /create HTTP/1.1" 400 43
translation-app-backend   | [26/Feb/2024 19:35:55] "POST /translation HTTP/1.1" 400 45

Cannot get the application to run

Dear!
I am totally new with Docker and many of the technologies used here, sorry for that, trying to learn. I feel I got pretty far but still cannot run the image. What I did: adding to requirements.txt > 'networkx==3.1' (somehow the python version does not match with the latest networkx). Installing NVIDIA Container Toolkit, PostgreSQL (and making a database, user with password), making a new Firebase bucket and adding all credentials (and json) to the .env file (btw what is the SECRET_KEY, this is deprecated in firebase).

I am on Ubuntu 22.04.4 LTS.

  1. What to actually put in the .env file?
  2. Any other files to edit?
  3. How to actually run the image after building?
  4. I see firebase_admin gets installed, does this mean you will run a local firebase instance or is this just a interface to google firebase?
  5. The frontend crashes, see:
translation-app-frontend  | yarn run v1.22.19
translation-app-frontend  | $ next dev
translation-app-frontend  | /bin/sh: 1: next: not found
translation-app-frontend  | error Command failed with exit code 127.
translation-app-frontend  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
translation-app-frontend exited with code 127
  1. The backend complains about module 'postgresql' not found. If I add postgresql to requirements.txt the error message also happens but now complains 'example' is not found. Im at a loss here. See:
translation-app-backend   | ModuleNotFoundError: No module named 'postgresql'

Full log:

$ sudo docker compose up --build 
[+] Building 996.7s (23/23) FINISHED                                                                                                  docker:default
 => [backend internal] load build definition from Dockerfile.backend                                                                            0.0s
 => => transferring dockerfile: 482B                                                                                                            0.0s
 => [backend internal] load metadata for docker.io/nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04                                                  1.9s
 => [backend internal] load .dockerignore                                                                                                       0.0s
 => => transferring context: 60B                                                                                                                0.0s
 => [backend 1/7] FROM docker.io/nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04@sha256:83e4b2841034cdf45ea5b9a5b472eb2c07b1b23d4836d32666a881db29  0.0s
 => [backend internal] load build context                                                                                                       0.0s
 => => transferring context: 8.13kB                                                                                                             0.0s
 => CACHED [backend 2/7] RUN apt-get update && apt-get install -y python3 python3-pip cmake wget llvm                                           0.0s
 => CACHED [backend 3/7] RUN apt-get install -y libglib2.0-0 libsm6 ffmpeg libxext6 libxrender-dev                                              0.0s
 => CACHED [backend 4/7] WORKDIR /translation-app-backend/Backend/                                                                              0.0s
 => [backend 5/7] COPY ./Backend/requirements.txt requirements.txt                                                                              0.0s
 => [backend 6/7] RUN pip install -r requirements.txt                                                                                         950.5s
 => [backend 7/7] COPY . .                                                                                                                      2.1s 
 => [backend] exporting to image                                                                                                               39.6s 
 => => exporting layers                                                                                                                        39.6s 
 => => writing image sha256:a8e1ddae12623261584381448390dc61460491c5190e16f283b500efa77e84f8                                                    0.0s 
 => => naming to docker.io/library/translation_layoutrecovery-backend                                                                           0.0s 
 => [frontend internal] load build definition from Dockerfile.frontend                                                                          0.0s 
 => => transferring dockerfile: 663B                                                                                                            0.0s
 => [frontend internal] load metadata for docker.io/library/node:20.5.1                                                                         2.3s
 => [frontend internal] load .dockerignore                                                                                                      0.0s
 => => transferring context: 60B                                                                                                                0.0s
 => [frontend 1/6] FROM docker.io/library/node:20.5.1@sha256:8d9887b3b05d2e65598a18616c37cfc271346d12248dfcbeadd7b7bf4da1e827                   0.0s
 => [frontend internal] load build context                                                                                                      0.1s
 => => transferring context: 1.82kB                                                                                                             0.1s
 => CACHED [frontend 2/6] WORKDIR /translation-app-frontend/                                                                                    0.0s
 => CACHED [frontend 3/6] RUN apt-get -y update && apt-get install -y nmh                                                                       0.0s
 => CACHED [frontend 4/6] COPY ./Frontend/package.json ./Frontend/yarn.lock .                                                                   0.0s
 => CACHED [frontend 5/6] RUN yarn install && yarn start                                                                                        0.0s
 => CACHED [frontend 6/6] COPY ./Frontend/ .                                                                                                    0.0s
 => [frontend] exporting to image                                                                                                               0.0s
 => => exporting layers                                                                                                                         0.0s
 => => writing image sha256:ff78cbb7220b2d30633f8f6df5fe22a4a60e6aaad164242fbb95d1bb16c88865                                                    0.0s
 => => naming to docker.io/library/translation_layoutrecovery-frontend                                                                          0.0s
[+] Running 4/1
 ✔ Container translation-app-backend                                   Recreated                                                                0.1s 
 ! backend Published ports are discarded when using host network mode                                                                           0.0s 
 ✔ Container translation-app-frontend                                  Recreated                                                                0.0s 
 ! frontend Published ports are discarded when using host network mode                                                                          0.0s 
Attaching to translation-app-backend, translation-app-frontend
translation-app-backend   | 
translation-app-backend   | ==========
translation-app-backend   | == CUDA ==
translation-app-backend   | ==========
translation-app-backend   | 
translation-app-backend   | CUDA Version 11.1.1
translation-app-backend   | 
translation-app-backend   | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
translation-app-backend   | 
translation-app-backend   | This container image and its contents are governed by the NVIDIA Deep Learning Container License.
translation-app-backend   | By pulling and using the container, you accept the terms and conditions of this license:
translation-app-backend   | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
translation-app-backend   | 
translation-app-backend   | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
translation-app-backend   | 
translation-app-frontend  | yarn run v1.22.19
translation-app-frontend  | $ next dev
translation-app-frontend  | /bin/sh: 1: next: not found
translation-app-frontend  | error Command failed with exit code 127.
translation-app-frontend  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
translation-app-frontend exited with code 127
translation-app-backend   | /usr/local/lib/python3.8/dist-packages/gdown/__main__.py:132: FutureWarning: Option `--id` was deprecated in version 4.3.1 and will be removed in 5.0. You don't need to pass it anymore to use a file ID.
translation-app-backend   |   warnings.warn(
translation-app-backend   | Downloading...
translation-app-backend   | From (original): https://drive.google.com/uc?id=1Jx2m_2I1d9PYzFRQ4gl82xQa-G7Vsnsl
translation-app-backend   | From (redirected): https://drive.google.com/uc?id=1Jx2m_2I1d9PYzFRQ4gl82xQa-G7Vsnsl&confirm=t&uuid=7fc30824-9127-47e2-82fc-5dc4acd98ec8
translation-app-backend   | To: /translation-app-backend/Backend/model_196000.pth
100%|██████████| 351M/351M [01:29<00:00, 3.91MB/s] 
translation-app-backend   | Obtaining file:///translation-app-backend
translation-app-backend   | Installing collected packages: translation-app
translation-app-backend   |   Running setup.py develop for translation-app
translation-app-backend   | Successfully installed translation-app
translation-app-backend   | Traceback (most recent call last):
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 113, in load_backend
translation-app-backend   |     return import_module("%s.base" % backend_name)
translation-app-backend   |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
translation-app-backend   |     return _bootstrap._gcd_import(name[level:], package, level)
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
translation-app-backend   | ModuleNotFoundError: No module named 'postgresql'
translation-app-backend   | 
translation-app-backend   | The above exception was the direct cause of the following exception:
translation-app-backend   | 
translation-app-backend   | Traceback (most recent call last):
translation-app-backend   |   File "manage.py", line 22, in <module>
translation-app-backend   |     main()
translation-app-backend   |   File "manage.py", line 18, in main
translation-app-backend   |     execute_from_command_line(sys.argv)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
translation-app-backend   |     utility.execute()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 416, in execute
translation-app-backend   |     django.setup()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/__init__.py", line 24, in setup
translation-app-backend   |     apps.populate(settings.INSTALLED_APPS)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/apps/registry.py", line 116, in populate
translation-app-backend   |     app_config.import_models()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/apps/config.py", line 269, in import_models
translation-app-backend   |     self.models_module = import_module(models_module_name)
translation-app-backend   |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
translation-app-backend   |     return _bootstrap._gcd_import(name[level:], package, level)
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
translation-app-backend   |   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/contrib/auth/models.py", line 3, in <module>
translation-app-backend   |     from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/contrib/auth/base_user.py", line 57, in <module>
translation-app-backend   |     class AbstractBaseUser(models.Model):
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/base.py", line 143, in __new__
translation-app-backend   |     new_class.add_to_class("_meta", Options(meta, app_label))
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/base.py", line 371, in add_to_class
translation-app-backend   |     value.contribute_to_class(cls, name)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/options.py", line 243, in contribute_to_class
translation-app-backend   |     self.db_table, connection.ops.max_name_length()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/utils/connection.py", line 15, in __getattr__
translation-app-backend   |     return getattr(self._connections[self._alias], item)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/utils/connection.py", line 62, in __getitem__
translation-app-backend   |     conn = self.create_connection(alias)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 193, in create_connection
translation-app-backend   |     backend = load_backend(db["ENGINE"])
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 126, in load_backend
translation-app-backend   |     raise ImproperlyConfigured(
translation-app-backend   | django.core.exceptions.ImproperlyConfigured: 'postgresql' isn't an available database backend or couldn't be imported. Check the above exception. To use one of the built-in backends, use 'django.db.backends.XXX', where XXX is one of:
translation-app-backend   |     'mysql', 'oracle', 'postgresql', 'sqlite3'
translation-app-backend exited with code 1

Python requirements fail on Ubuntu

The build process fails on the Python requirements.

45.89 Downloading https://download.pytorch.org/whl/networkx-3.2.1-py3-none-any.whl (1.6 MB)
46.81 ERROR: Package 'networkx' requires a different Python: 3.8.10 not in '>=3.9'
------
failed to solve: process "/bin/sh -c pip install -r requirements.txt" did not complete successfully: exit code: 1

Multiple errors

It is the first time that I use docker and honestly, I have no idea how it works, I have limited myself to following the installation instructions that you indicate but I cannot in any way get the app to work. In the installation instructions, step 3 states Important: Then, put the necessary environment files (.env) in this folder. Since I don't really know what to do in this step, I have limited myself to renaming the .env-template file to .env:

CREDENTIAL_JSON_FILE_NAME=example
STORAGE_BUCKET_NAME=example
SECRET_KEY=example

DATABASE_ENGINE=example
DATABASE_NAME=example
DATABASE_USER=example
DATABASE_PASSWORD=example
DATABASE_HOST=example
DATABASE_PORT=example

I am using a Windows 11 machine and Docker-desktop configured on wsl2

  1. The first error I got was during the process [backend 6/7] RUN pip install -r requirements.txt:
    9.809 ERROR: Package 'networkx' requires a different Python: 3.8.10 not in '>=3.9'
    This bug was fixed by adding 'networkx==3.1' in the requirements.txt file

  2. The second error I ran into took place in [+] Running 4/3

translation-app-frontend  | yarn run v1.22.19
translation-app-frontend  | $ next dev
translation-app-frontend  | /bin/sh: 1: next: not found
translation-app-frontend  | error Command failed with exit code 127.
translation-app-frontend  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
translation-app-frontend exited with code 127

As I said at the beginning, I have no idea about docker (or next), but by consulting some related problems I was able to solve it (or so I think) by modifying the volume configuration in the services docker-compose.yml. I'm not sure if this is correct but it apparently solved the problem:

    volumes:
      - ./Frontend:/translation-app-frontend
      - /translation-app-frontend/node_modules
  1. The third error also occurs in [+] Running 4/3:
[+] Running 4/3
 ✔ Container translation-app-backend                                   Recreated                                     0.1s
 ! backend Published ports are discarded when using host network mode                                   0.0s
 ✔ Container translation-app-frontend                                  Recreated                                      0.1s
 ! frontend Published ports are discarded when using host network mode                                   0.0s

I guess this is why when I access http://localhost:3000/ the page doesn't load, but although I have searched for information and it seems that using host.docker.internal instead of localhost:xxxx could be a solution as suggested in this related issue ([](https://stackoverflow.com/questions/55851632/docker-compose-network-mode -host-not-working)), I don't know where to make the modifications and therefore I haven't been able to solve it:
image

  1. Finally, in addition to the previous error that I don't know how to solve, an error message always appears in [+] Running 4/3 after Successfully installed translation-app. I also don't know how to fix this error:
translation-app-backend   | django.core.exceptions.ImproperlyConfigured: 'example' isn't an available database backend or couldn't be imported. Check the above exception. To use one of the built-in backends, use 'django.db.backends.XXX', where XXX is one of:
translation-app-backend   |     'mysql', 'oracle', 'postgresql', 'sqlite3'
translation-app-backend exited with code 1
  • Full log:
[+] Building 48.8s (11/12)                                                                                                                          docker:default
[+] Building 48.9s (12/12)                                                                                                                          docker:default
[+] Building 55.9s (23/23) FINISHED                                                                                                                 docker:default
 => [backend internal] load build definition from Dockerfile.backend                                                                                          0.3s
 => => transferring dockerfile: 496B                                                                                                                          0.2s
 => [backend internal] load metadata for docker.io/nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04                                                                2.1s
 => [backend internal] load .dockerignore                                                                                                                     0.1s
 => => transferring context: 61B                                                                                                                              0.1s
 => [backend 1/7] FROM docker.io/nvidia/cuda:11.1.1-cudnn8-devel-ubuntu20.04@sha256:83e4b2841034cdf45ea5b9a5b472eb2c07b1b23d4836d32666a881db29a8dceb          0.0s
 => [backend internal] load build context                                                                                                                    45.2s
 => => transferring context: 410.64MB                                                                                                                        45.2s
 => CACHED [backend 2/7] RUN apt-get update && apt-get install -y python3 python3-pip cmake wget llvm                                                         0.0s
 => CACHED [backend 3/7] RUN apt-get install -y libglib2.0-0 libsm6 ffmpeg libxext6 libxrender-dev                                                            0.0s
 => CACHED [backend 4/7] WORKDIR /translation-app-backend/Backend/                                                                                            0.0s
 => CACHED [backend 5/7] COPY ./Backend/requirements.txt requirements.txt                                                                                     0.0s
 => CACHED [backend 6/7] RUN pip install -r requirements.txt                                                                                                  0.0s
 => [backend 7/7] COPY . .                                                                                                                                    0.5s
 => [backend] exporting to image                                                                                                                              0.6s
 => => exporting layers                                                                                                                                       0.6s
 => => writing image sha256:07882e1572e76b15b00cbc9d13cf2cabbf19e549e42b5958115f068bc7056ef3                                                                  0.0s
 => => naming to docker.io/library/translation_layoutrecovery-backend                                                                                         0.0s
 => [frontend internal] load build definition from Dockerfile.frontend                                                                                        0.0s
 => => transferring dockerfile: 685B                                                                                                                          0.0s
 => [frontend internal] load metadata for docker.io/library/node:20.5.1                                                                                       0.7s
 => [frontend internal] load .dockerignore                                                                                                                    0.0s
 => => transferring context: 61B                                                                                                                              0.0s
 => [frontend internal] load build context                                                                                                                    0.1s
 => => transferring context: 5.36kB                                                                                                                           0.0s
 => [frontend 1/6] FROM docker.io/library/node:20.5.1@sha256:8d9887b3b05d2e65598a18616c37cfc271346d12248dfcbeadd7b7bf4da1e827                                 0.0s
 => CACHED [frontend 2/6] WORKDIR /translation-app-frontend/                                                                                                  0.0s
 => CACHED [frontend 3/6] RUN apt-get -y update && apt-get install -y nmh                                                                                     0.0s
 => CACHED [frontend 4/6] COPY ./Frontend/package.json ./Frontend/yarn.lock .                                                                                 0.0s
 => CACHED [frontend 5/6] RUN yarn install && yarn start                                                                                                      0.0s
 => [frontend 6/6] COPY ./Frontend/ .                                                                                                                         0.1s
 => [frontend] exporting to image                                                                                                                             0.3s
 => => exporting layers                                                                                                                                       0.2s
 => => writing image sha256:361f9517a95837f680c87c9fc28125acd2a1a5cd14c9c3be235eb4430ec51691                                                                  0.0s
 => => naming to docker.io/library/translation_layoutrecovery-frontend                                                                                        0.0s
[+] Running 4/4
 ✔ Container translation-app-backend                                   Recreated                                                                              1.2s
 ! backend Published ports are discarded when using host network mode                                                                                         0.0s
 ✔ Container translation-app-frontend                                  Recreated                                                                              1.1s
 ! frontend Published ports are discarded when using host network mode                                                                                        0.0s
Attaching to translation-app-backend, translation-app-frontend
translation-app-backend   |
translation-app-backend   | ==========
translation-app-backend   | == CUDA ==
translation-app-backend   | ==========
translation-app-backend   |
translation-app-backend   | CUDA Version 11.1.1
translation-app-backend   |
translation-app-backend   | Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
translation-app-backend   |
translation-app-backend   | This container image and its contents are governed by the NVIDIA Deep Learning Container License.
translation-app-backend   | By pulling and using the container, you accept the terms and conditions of this license:
translation-app-backend   | https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
translation-app-backend   |
translation-app-backend   | A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
translation-app-backend   |
translation-app-frontend  | yarn run v1.22.19
translation-app-frontend  | $ next dev
translation-app-backend   | /usr/local/lib/python3.8/dist-packages/gdown/__main__.py:132: FutureWarning: Option `--id` was deprecated in version 4.3.1 and will be removed in 5.0. You don't need to pass it anymore to use a file ID.
translation-app-backend   |   warnings.warn(
translation-app-backend   | Downloading...
translation-app-backend   | From (original): https://drive.google.com/uc?id=1Jx2m_2I1d9PYzFRQ4gl82xQa-G7Vsnsl
translation-app-backend   | From (redirected): https://drive.google.com/uc?id=1Jx2m_2I1d9PYzFRQ4gl82xQa-G7Vsnsl&confirm=t&uuid=e803f44b-b923-4895-b646-04a56c7409b9
translation-app-backend   | To: /translation-app-backend/Backend/model_196000.pth
translation-app-frontend  | - ready started server on 0.0.0.0:3000, url: http://localhost:3000
translation-app-frontend  | - event compiled client and server successfully in 4.2s (20 modules)
translation-app-frontend  | - wait compiling...
translation-app-frontend  | - event compiled client and server successfully in 119 ms (20 modules)
100%|██████████| 351M/351M [00:37<00:00, 9.37MB/s]
translation-app-backend   | Obtaining file:///translation-app-backend
translation-app-backend   | Installing collected packages: translation-app
translation-app-backend   |   Running setup.py develop for translation-app
translation-app-backend   | Successfully installed translation-app
translation-app-backend   | Traceback (most recent call last):
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 113, in load_backend
translation-app-backend   |     return import_module("%s.base" % backend_name)
translation-app-backend   |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
translation-app-backend   |     return _bootstrap._gcd_import(name[level:], package, level)
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
translation-app-backend   | ModuleNotFoundError: No module named 'example'
translation-app-backend   |
translation-app-backend   | The above exception was the direct cause of the following exception:
translation-app-backend   |
translation-app-backend   | Traceback (most recent call last):
translation-app-backend   |   File "manage.py", line 22, in <module>
translation-app-backend   |     main()
translation-app-backend   |   File "manage.py", line 18, in main
translation-app-backend   |     execute_from_command_line(sys.argv)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
translation-app-backend   |     utility.execute()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/core/management/__init__.py", line 416, in execute
translation-app-backend   |     django.setup()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/__init__.py", line 24, in setup
translation-app-backend   |     apps.populate(settings.INSTALLED_APPS)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/apps/registry.py", line 116, in populate
translation-app-backend   |     app_config.import_models()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/apps/config.py", line 269, in import_models
translation-app-backend   |     self.models_module = import_module(models_module_name)
translation-app-backend   |   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
translation-app-backend   |     return _bootstrap._gcd_import(name[level:], package, level)
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
translation-app-backend   |   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
translation-app-backend   |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/contrib/auth/models.py", line 3, in <module>
translation-app-backend   |     from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/contrib/auth/base_user.py", line 57, in <module>
translation-app-backend   |     class AbstractBaseUser(models.Model):
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/base.py", line 143, in __new__
translation-app-backend   |     new_class.add_to_class("_meta", Options(meta, app_label))
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/base.py", line 371, in add_to_class
translation-app-backend   |     value.contribute_to_class(cls, name)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/models/options.py", line 243, in contribute_to_class
translation-app-backend   |     self.db_table, connection.ops.max_name_length()
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/utils/connection.py", line 15, in __getattr__
translation-app-backend   |     return getattr(self._connections[self._alias], item)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/utils/connection.py", line 62, in __getitem__
translation-app-backend   |     conn = self.create_connection(alias)
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 193, in create_connection
translation-app-backend   |     backend = load_backend(db["ENGINE"])
translation-app-backend   |   File "/usr/local/lib/python3.8/dist-packages/django/db/utils.py", line 126, in load_backend
translation-app-backend   |     raise ImproperlyConfigured(
translation-app-backend   | django.core.exceptions.ImproperlyConfigured: 'example' isn't an available database backend or couldn't be imported. Check the above exception. To use one of the built-in backends, use 'django.db.backends.XXX', where XXX is one of:
translation-app-backend   |     'mysql', 'oracle', 'postgresql', 'sqlite3'
translation-app-backend exited with code 1

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.