The Language search feature on website is not working
PrajwalM2212 opened this issue · 11 comments
@AMR-KELEG reported that the issue was with the api: https://webservices.coala.io/list/bears
The request returns an empty json response.
The backend can be found at https://gitlab.com/coala/landing if the issue is with the api.
I have been trying to figure what is the problem in api, but couldn't find it.
but while i was going through settings, the domain webservices.coala.io
was not mentioned in ALLOWED_HOSTS. Maybe, due to this there is nothing in JSON response or the errors are raised.
Every url in coala_web.urls
is giving response, while running the app locally, but the production app is giving either Server Error (500)
or no JSON response
.
maybe to reproduce this we need to run the backend with docker to get the exact environment. I could reproduce it earlier by running it with the given dockerfile in coala/landing repo on gitlab. Related https://gitlab.com/coala/package_manager/issues/150
Also, when i run the backend with these instruction, it logs in terminal that it is listening at url - http://0.0.0.0:8000
but on surfing this url, it says Bad Request(400)
and when i tried 127.0.01:8000
the backend works properly as mentioned in my above comment.
Is this acceptable, with that Bad reques 400
error ?
Also running the coala-landing
locally, raises following error in console
@KVGarg in my case when i am trying to migrate it as per instructions it throws me error
akshit@akshit-Inspiron-5567:~/landing/backend$ python manage.py makemigrationsTraceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 316, in execute
settings.INSTALLED_APPS
File "/usr/local/lib/python3.5/dist-packages/django/conf/__init__.py", line 53, in __getattr__
self._setup(name)
File "/usr/local/lib/python3.5/dist-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/local/lib/python3.5/dist-packages/django/conf/__init__.py", line 97, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/akshit/landing/backend/coala_web/settings.py", line 225, in <module>
BEAR_CRON_TIME = os.environ['BEAR_CRON_TIME']
File "/usr/lib/python3.5/os.py", line 725, in __getitem__
raise KeyError(key) from None
KeyError: 'BEAR_CRON_TIME'
can u share what error You are getting when you are running it locally
The error you are getting is concerned with the environment variables. CRON variables like BEAR_CRON_TIME value is being retrieved from the environment variables. In my case also i was also getting the same error then I replaced the value of BEAR_CRON_TIME to '*/200 * * * *'.
Changing to this will solve your error, but it isn't recommendable i guess.
ya because it is when we run the environment locally using docker
Ah, thanks for the heads up. Link for the lazy: https://github.com/coala/bear-docs/