Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My static and media folders aren't being populated. #69

Open
leaderofthegooftroop opened this issue Dec 9, 2023 · 2 comments
Open

My static and media folders aren't being populated. #69

leaderofthegooftroop opened this issue Dec 9, 2023 · 2 comments

Comments

@leaderofthegooftroop
Copy link

leaderofthegooftroop commented Dec 9, 2023

wger_server
`updated exercise f5252fbe-1e00-4b8d-8781-2e56d6a5250f

  • updated translation es 23d0f076-c7a1-4ce6-ad68-d051508a019b - Elevación tibial anterior
  • updated translation en 121f6364-0901-4e90-9895-b3937b348fb4 - Tibialis raises
    updated exercise 8c132ea0-7885-474f-8514-0909ae22bdf6
  • updated translation en 2c58bd06-b986-482d-8156-1502b888199f - Dragon squat
    updated exercise 7212cc74-656e-47ce-8292-d211676f2ee1
  • updated translation en 4406ac0a-39ed-4616-9dcd-3f4bf2857a11 - Side Lying Hip Abduction
    updated exercise db4eaf0f-f4d4-4e63-b9fb-258985bc2858
  • updated translation en 029d85b7-1b77-4baa-97b7-5d8135a91ae4 - Calf raises, left leg
    updated exercise 517265a2-e4f7-4b33-979f-9be1efd86343
  • updated translation en ee767b2d-99ca-4da2-8117-d75e47945f5e - Cycling cardio session
    updated exercise 2cc92db8-b245-44b8-b1d6-bf91c78c2ab9
  • updated translation en 6b77a0ac-b932-4c64-94bd-a18b3841a2c7 - Wrist curl, dumbbells
    updated exercise 6f0d5766-05ac-41b5-a592-7036ac99ee49
  • updated translation de 59ab1b39-78ff-4b45-aa1e-6783ce934ae6 - Skorpion-Kick
  • updated translation en c98f33b4-c1fe-47fb-bb16-fd14753c45f9 - scorpion kick
    updated exercise 89651d40-9abf-49b5-9ee5-7b0ecb25fd03
  • updated translation en 83a5c65e-40ff-4d8e-8931-0748b2750d7c - Scorpion Kick
  • updated translation de bb6db8e2-ab1b-414b-980e-fbf31c3a1e0d - Skorpion-Kick
    updated exercise f9866335-e489-404b-84b5-248fb8512702
  • updated translation en fa39d6f2-0efa-4b16-8660-266194e77f86 - Prisoner Squat
  • updated translation de 42ff0c9d-2516-48e8-907c-cabcac07d960 - Prisoner Squat
    updated exercise 716286dd-05b1-4f87-8b3b-a0c559bcafc4
  • updated translation de 2e5a6803-4f97-45c0-974b-ce6212608a6a - Schulterbreite Dreipunkt-Liegestütze
  • updated translation en 0830bae6-4229-43c9-83f7-efbb059873b3 - Shoulder width three-point push-up
    updated exercise 965b0d80-544b-4f22-a64b-32dc033f071a
  • updated translation de 4991f24c-1b57-43bc-8804-f41837b46273 - Fallschirmspringer in T-Position
  • updated translation en d1c3c4cb-9ccc-43d5-bd05-e1dd6088b0c9 - Skydiver with arms in T-position
    updated exercise a3125129-203f-4195-8f8a-a460ff9e9481
  • updated translation en 160d00fc-451d-485e-9a34-3763baadd2d7 - Romanian deadlift, single leg
    done!
    *** Deleting exercises data that was removed on the server...
    Downloading exercise images
    INFO 2023-12-08 17:42:26,043 apps AXES: BEGIN version 6.1.1, blocking by ip_address
    *** Processing images ***
    Processing image ef0b00e2-3323-4e7f-88fe-d71ef34b3384
    Image not found in local DB, creating now...
    Traceback (most recent call last):
    File "/home/wger/src/wger/exercises/sync.py", line 357, in download_exercise_images
    ExerciseImage.objects.get(uuid=image_uuid)
    File "/usr/local/lib/python3.10/dist-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, kwargs)
    File "/usr/local/lib/python3.10/dist-packages/django/db/models/query.py", line 650, in get
    raise self.model.DoesNotExist(
    wger.exercises.models.image.ExerciseImage.DoesNotExist: ExerciseImage matching query does not exist.
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
    File "/home/wger/src/manage.py", line 25, in
    execute_from_command_line(sys.argv)
    File "/usr/local/lib/python3.10/dist-packages/django/core/management/init.py", line 446, in execute_from_command_line
    utility.execute()
    File "/usr/local/lib/python3.10/dist-packages/django/core/management/init.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python3.10/dist-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, cmd_options)
    File "/usr/local/lib/python3.10/dist-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, options)
    File "/home/wger/src/wger/exercises/management/commands/download-exercise-images.py", line 70, in handle
    download_exercise_images(self.stdout.write, remote_url, self.style.SUCCESS)
    File "/home/wger/src/wger/exercises/sync.py", line 363, in download_exercise_images
    image = ExerciseImage.from_json(exercise_base, retrieved_image, image_data)
    File "/home/wger/src/wger/exercises/models/image.py", line 197, in from_json
    image.save_image(retrieved_image, json_data)
    File "/home/wger/src/wger/utils/helpers.py", line 246, in save_image
    self.image.save(
    File "/usr/local/lib/python3.10/dist-packages/django/db/models/fields/files.py", line 92, in save
    self.name = self.storage.save(name, content, max_length=self.field.max_length)
    File "/usr/local/lib/python3.10/dist-packages/django/core/files/storage.py", line 56, in save
    name = self._save(name, content)
    File "/usr/local/lib/python3.10/dist-packages/django/core/files/storage.py", line 295, in _save
    os.makedirs(directory, exist_ok=True)
    File "/usr/lib/python3.10/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
    File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
    PermissionError: [Errno 13] Permission denied: '/home/wger/media/exercise-images'
    INFO 2023-12-08 17:42:33,542 apps AXES: BEGIN version 6.1.1, blocking by ip_address
    Set site URL to 192.168.1.3:8000
    Using gunicorn...
    [2023-12-08 23:42:34 +0000] [92] [INFO] Starting gunicorn 21.2.0
    [2023-12-08 23:42:34 +0000] [92] [INFO] Listening at: http://0.0.0.0:8000 (92)
    [2023-12-08 23:42:34 +0000] [92] [INFO] Using worker: sync
    [2023-12-08 23:42:34 +0000] [93] [INFO] Booting worker with pid: 93
    INFO 2023-12-08 17:42:34,851 apps AXES: BEGIN version 6.1.1, blocking by ip_address
    INFO 2023-12-08 17:58:11,094 cache AXES: Successful login by {username: "
    ", ip_address: "******", user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0", path_info: "/en/user/login"}.`

wger_celery_worker

`INFO 2023-12-08 17:42:39,502 apps AXES: BEGIN version 6.1.1, blocking by ip_address

-------------- celery@ea926f424169 v5.3.4 (emerald-rush)
--- ***** -----
-- ******* ---- Linux-6.1.0-0.deb11.11-amd64-x86_64-with-glibc2.35 2023-12-08 17:42:39

  • *** --- * ---
  • ** ---------- [config]
  • ** ---------- .> app: wger:0x7f2086e92500
  • ** ---------- .> transport: redis://cache:6379/2
  • ** ---------- .> results: redis://cache:6379/2
  • *** --- * --- .> concurrency: 4 (prefork)
    -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
    --- ***** -----
    -------------- [queues]
    .> celery exchange=celery(direct) key=celery

[tasks]
. wger.exercises.tasks.sync_exercises_task
. wger.exercises.tasks.sync_images_task
. wger.exercises.tasks.sync_videos_task
. wger.nutrition.tasks.fetch_all_ingredient_images_task
. wger.nutrition.tasks.fetch_ingredient_image_task
[2023-12-08 17:42:40,197: WARNING/MainProcess] /usr/local/lib/python3.10/dist-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
warnings.warn(
[2023-12-08 17:42:40,202: INFO/MainProcess] Connected to redis://cache:6379/2
[2023-12-08 17:42:40,203: WARNING/MainProcess] /usr/local/lib/python3.10/dist-packages/celery/worker/consumer/consumer.py:507: CPendingDeprecationWarning: The broker_connection_retry configuration setting will no longer determine
whether broker connection retries are made during startup in Celery 6.0 and above.
If you wish to retain the existing behavior for retrying connections on startup,
you should set broker_connection_retry_on_startup to True.
warnings.warn(
[2023-12-08 17:42:40,205: INFO/MainProcess] mingle: searching for neighbors
[2023-12-08 17:42:41,214: INFO/MainProcess] mingle: all alone
[2023-12-08 17:42:41,239: INFO/MainProcess] celery@ea926f424169 ready.`

wger_celery_beat

celery beat v5.3.4 (emerald-rush) is starting. INFO 2023-12-08 17:42:51,807 apps AXES: BEGIN version 6.1.1, blocking by ip_address __ - ... __ - _ LocalTime -> 2023-12-08 17:42:52 Configuration -> . broker -> redis://cache:6379/2 . loader -> celery.loaders.app.AppLoader . scheduler -> celery.beat.PersistentScheduler . db -> /home/wger/beat/celerybeat-schedule . logfile -> [stderr]@%INFO . maxinterval -> 5.00 minutes (300s) [2023-12-08 17:42:52,213: INFO/MainProcess] beat: Starting...

@leaderofthegooftroop
Copy link
Author

I'm sure its a permissions issue, but I'm not sure what chmod or chown to pass to get it working.

@rolandgeider
Copy link
Member

Mhhh, from the exception there it seems the Image isn't in the local db, did you call the sync exercise command first? (But in any case we should handle that case more gracefully)

Have you changed anything on the compose setup? Specially setting the volumes as mapped folders does make some permission problems from what I've heard from others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants