learningequality / learningequality/studio

Using of S3 bucket instead of minio, getting error

Open
#3,411 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Hi Team,

I am trying to use the S3 instead of the minio by default storage and i am getting error while doing this i have filled my credentials of AWS but getting error

48% building 317/352 modules 35 active ...home/dbhatt/Projects/Kolibri/studio/contentcuration/contentcuration/frontend/shared/leUtils/ContentKinds.jsTraceback (most recent call last):
File "manage.py", line 11, in
execute_from_command_line(sys.argv)
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/django/core/management/init.py", line 363, in execute
settings.INSTALLED_APPS
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/django/conf/init.py", line 82, in getattr
self._setup(name)
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/django/conf/init.py", line 69, in _setup
self._wrapped = Settings(settings_module)
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/django/conf/init.py", line 170, in init
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/dbhatt/Projects/Kolibri/studio/contentcuration/contentcuration/init.py", line 5, in
from .celery import app as celery_app # noqa
File "/home/dbhatt/Projects/Kolibri/studio/contentcuration/contentcuration/celery.py", line 17, in
django.setup()
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
app_config.ready()
File "/home/dbhatt/Projects/Kolibri/studio/contentcuration/contentcuration/apps.py", line 16, in ready
ensure_storage_bucket_public()
File "/home/dbhatt/Projects/Kolibri/studio/contentcuration/contentcuration/utils/minio_utils.py", line 62, in ensure_storage_bucket_public
if not c.bucket_exists(bucketname):
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/minio/api.py", line 652, in bucket_exists
self._execute("HEAD", bucket_name)
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/minio/api.py", line 394, in _execute
region = self._get_region(bucket_name, None)
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/minio/api.py", line 461, in _get_region
response = self._url_open(
File "/home/dbhatt/Projects/Kolibri/studio-env/lib/python3.8/site-packages/minio/api.py", line 306, in _url_open
raise InvalidResponseError(
minio.error.InvalidResponseError: non-XML response from server; Response code: 404, Content-Type: text/html, Body:

NoSuchKey
The resource you requested does not exist
/mybucket/myfoto.jpg
4442587FB7D0A2F9

am i doing something wrong. Can anybody suggest me how i need to resolve this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with contentcuration/apps.py and contentcuration/utils/minio_utils.py, especially ensure_storage_bucket_public, then inspect how the S3 storage settings are loaded. Reproduce the reported configuration and trace the bucket_exists call; done means the application starts with AWS S3 configured without the InvalidResponseError.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.