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

9th
Jan 2017
Parag Jain
@PARAG00991
Jan 09 2017 06:12
I'm getting INTERNAL SERVER ERROR on running the server after I pulled in the changes with the following error in the console :
127.0.0.1 - - [09/Jan/2017 11:38:51] "GET / HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/werkzeug/serving.py", line 193, in run_wsgi
    execute(self.server.app)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/werkzeug/serving.py", line 181, in execute
    application_iter = app(environ, start_response)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1994, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask_socketio/__init__.py", line 37, in __call__
    start_response)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/engineio/middleware.py", line 49, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/parag00991/OpenSource/fossasia/open-event-orga-server/app/__init__.py", line 88, in __call__
    return self.app(environ, start_response)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask_restplus/api.py", line 536, in error_router
    return original_handler(e)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/app.py", line 1547, in handle_exception
    return self.finalize_request(handler(e), from_error_handler=True)
  File "/home/parag00991/OpenSource/fossasia/open-event-orga-server/app/__init__.py", line 174, in server_error
    return render_template('gentelella/errors/500.html'), 500
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/templating.py", line 132, in render_template
    ctx.app.update_template_context(context)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/app.py", line 764, in update_template_context
    context.update(func())
  File "/home/parag00991/OpenSource/fossasia/open-event-orga-server/app/__init__.py", line 264, in pages
    pages = DataGetter.get_all_pages(get_locale())
  File "/home/parag00991/OpenSource/fossasia/open-event-orga-server/app/helpers/data_getter.py", line 638, in get_all_pages
    return Page.query.filter_by(language=selected_lang).order_by(desc(Page.index)).all()
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2613, in all
    return list(self)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2761, in __iter__
    return self._execute_and_instances(context)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
    return meth(self, multiparams, params)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
    context)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
    exc_info
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
    context)
ending with:
InternalError: (psycopg2.InternalError) current transaction is aborted, commands ignored until endf transaction block
 [SQL: 'SELECT pages.id AS pages_id, pages.name AS pages_name, pages.title AS pages_title, pages.u AS pages_url, pages.description AS pages_description, pages.place AS pages_place, pages.language  pages_language, pages.index AS pages_index \nFROM pages \nWHERE pages.language = %(language_1)s OER BY pages.index DESC'] [parameters: {'language_1': u'en'}]
Arpit Nandwani
@arpitn30
Jan 09 2017 06:31
Can anyone please send me the link of the documentation for app.models.page.Page class
Parag Jain
@PARAG00991
Jan 09 2017 06:32
Thanks. The problem is solved.
Arpit Nandwani
@arpitn30
Jan 09 2017 07:51
results = Page.query.filter(Page.url.contains(url))
Which table is being queried here and what do the functions filter and url.contains return when there isn't any entry in the table?
pipix51
@pipix51
Jan 09 2017 09:54
@arpitn30 Let me look
I'm not very sure about what table is being queried here...
However the functions filter and url.contains should just return an empty QuerySet if there are no entries in the table
@arpitn30 May I know which file is this from?
Arpit Nandwani
@arpitn30
Jan 09 2017 14:10
data_getter.py in helpers
Arpit Nandwani
@arpitn30
Jan 09 2017 16:05
It basically queries the database for similar url but the problem is the pages table is empty and no other table has any relation to what can be used as a url with the help of a foreign key
Medo
@magdalenesuo
Jan 09 2017 17:19
@niranjan94 @SaptakS I am unable to create discount. I cannot fill in the marketer field. It goes blank after save.
Saptak Sengupta
@SaptakS
Jan 09 2017 17:20
@magdalenesuo are you doing it through the admin panel?
Medo
@magdalenesuo
Jan 09 2017 17:21
@SaptakS yes
Saptak Sengupta
@SaptakS
Jan 09 2017 17:22
@magdalenesuo I think there are some issues with the discount codes in the sales tab of admin panel..
@magdalenesuo you can create an event, then go to the ticketing tab and create discount codes from there..
Medo
@magdalenesuo
Jan 09 2017 17:26
@SaptakS Ok. got it. Thanks
Satwik Kansal
@satwikkansal
Jan 09 2017 17:38
@SaptakS In the create event form, the option to use tickets is not displayed in my localhost version while it's there in http://open-event-dev.herokuapp.com/events/create/
Screenshot from 2017-01-09 23-05-44.png
Medo
@magdalenesuo
Jan 09 2017 17:42
@satwikkansal Hey. Go to admin and turn on ticketing in modules. :smiley:
Satwik Kansal
@satwikkansal
Jan 09 2017 17:46
@magdalenesuo It works. Thanks a lot :smile: