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

The Language search feature on website is not working #289

Open
PrajwalM2212 opened this issue Oct 17, 2018 · 11 comments
Open

The Language search feature on website is not working #289

PrajwalM2212 opened this issue Oct 17, 2018 · 11 comments

Comments

@PrajwalM2212
Copy link
Member

screen shot 2018-09-21 at 8 59 44 am

@PrajwalM2212
Copy link
Member Author

PrajwalM2212 commented Oct 17, 2018

@AMR-KELEG reported that the issue was with the api: https://webservices.coala.io/list/bears
The request returns an empty json response.

@PrajwalM2212
Copy link
Member Author

The backend can be found at https://gitlab.com/coala/landing if the issue is with the api.

@KVGarg
Copy link

KVGarg commented Jan 5, 2019

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.

@hemangsk
Copy link
Member

hemangsk commented Jan 5, 2019

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

@KVGarg
Copy link

KVGarg commented Jan 6, 2019

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
image

@AkshJain99
Copy link
Member

@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

@KVGarg
Copy link

KVGarg commented Jan 13, 2019

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.

@AkshJain99
Copy link
Member

ya because it is when we run the environment locally using docker

@Ghoughpteighbteau
Copy link

I'm just investigating integrating coala into our stack, and the language search tool doesn't even make a request to an API

Image of network activity for search

no json. In the mean time, where should I be looking for a list of bears?

@AkshJain99
Copy link
Member

AkshJain99 commented Feb 13, 2019 via email

@Ghoughpteighbteau
Copy link

Ah, thanks for the heads up. Link for the lazy: https://github.com/coala/bear-docs/

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

No branches or pull requests

6 participants