These are chat archives for fossasia/open-event-server

29th
Apr 2018
Bhavesh Anand
@bhaveshAn
Apr 29 2018 05:59

/auth/session
Headers

Content-Type: application/json

Body

{
  "email": "email@example.com",
  "password": "password"
}
@schedutron Let us know if it works now ?
Saurav Tiwary
@srv-twry
Apr 29 2018 06:02
@schedutron It complains about the wrong credentials because you are hitting the wrong endpoint.
You are trying to register a user from /auth/session which is meant for sending access token
Nabarun Pal
@palnabarun
Apr 29 2018 06:37

Hi everybody, I am new here. I am trying to set up the stack for open-event-server using Docker. However, I am getting error while creating the tables. Below is the stacktrace:

root@47f6e77bc792:/open_event# python manage.py db stamp head
/usr/local/lib/python2.7/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
/usr/local/lib/python2.7/site-packages/envparse.py:195: UserWarning: Could not any envfile.
  warnings.warn('Could not any envfile.')
Traceback (most recent call last):
  File "manage.py", line 96, in <module>
    manager.run()
  File "/usr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 417, in run
    result = self.handle(argv[0], argv[1:])
  File "/usr/local/lib/python2.7/site-packages/flask_script/__init__.py", line 386, in handle
    res = handle(*args, **config)
  File "/usr/local/lib/python2.7/site-packages/flask_script/commands.py", line 215, in __call__
    with app.test_request_context():
  File "/usr/local/lib/python2.7/site-packages/flask/ctx.py", line 390, in __enter__
    self.push()
  File "/usr/local/lib/python2.7/site-packages/flask/ctx.py", line 332, in push
    self.session = self.app.open_session(self.request)
  File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 912, in open_session
    return self.session_interface.open_session(self, request)
  File "/usr/local/lib/python2.7/site-packages/flask/sessions.py", line 324, in open_session
    s = self.get_signing_serializer(app)
  File "/usr/local/lib/python2.7/site-packages/flask/sessions.py", line 321, in get_signing_serializer
    signer_kwargs=signer_kwargs)
  File "/usr/local/lib/python2.7/site-packages/itsdangerous.py", line 519, in __init__
    self.is_text_serializer = is_text_serializer(serializer)
  File "/usr/local/lib/python2.7/site-packages/itsdangerous.py", line 69, in is_text_serializer
    return isinstance(serializer.dumps({}), text_type)
  File "/usr/local/lib/python2.7/site-packages/flask/sessions.py", line 85, in dumps
    return json.dumps(_tag(value), separators=(',', ':'))
  File "/usr/local/lib/python2.7/site-packages/flask/json/__init__.py", line 177, in dumps
    _dump_arg_defaults(kwargs)
  File "/usr/local/lib/python2.7/site-packages/flask/json/__init__.py", line 98, in _dump_arg_defaults
    bp.json_encoder if bp and bp.json_encoder
AttributeError: 'Blueprint' object has no attribute 'json_encoder'
root@47f6e77bc792:/open_event#

Did anybody else encounter this issue?

Ricky Ng-Adam
@rngadam
Apr 29 2018 09:04
I managed to get pass that error by modifying venv/lib/python2.7/site-packages/flask/json/__init__.py ...but looks like there's a missing dependency (and flask doesn't handle it very well)
Screen Shot 2018-04-29 at 5.04.36 PM.png
Mayank Vaidya
@mayank8318
Apr 29 2018 09:05
@bhaveshAn @simarsingh24 Were you able to solve the kubernetes issue? I am facing the same problem
Harsimar
@simarsingh24
Apr 29 2018 09:29
@mayank8318 not till yet! Please update on this group if anybody finds any solution
Mayank Vaidya
@mayank8318
Apr 29 2018 09:30
:+1:
Saurabh Chaturvedi
@schedutron
Apr 29 2018 21:14
When hitting the /v1/users endpoint with the data as { "email": "email@example.com", "password": "password" }, I get the following error:
{"description":"Request does not contain an access token","error":"Authorization Required","status_code":401}
Same is the case when I pass the detailed user data (given as example in the docs) at the v1/users endpoint.