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

Jan 2017
Parag Jain
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 : - - [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/", line 193, in run_wsgi
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/werkzeug/", line 181, in execute
    application_iter = app(environ, start_response)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/", line 1994, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask_socketio/", line 37, in __call__
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/engineio/", line 49, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/parag00991/OpenSource/fossasia/open-event-orga-server/app/", line 88, in __call__
    return, start_response)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask_restplus/", line 536, in error_router
    return original_handler(e)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/", 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/", line 174, in server_error
    return render_template('gentelella/errors/500.html'), 500
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/", line 132, in render_template
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/flask/", line 764, in update_template_context
  File "/home/parag00991/OpenSource/fossasia/open-event-orga-server/app/", line 264, in pages
    pages = DataGetter.get_all_pages(get_locale())
  File "/home/parag00991/OpenSource/fossasia/open-event-orga-server/app/helpers/", 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/", line 2613, in all
    return list(self)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/", line 2761, in __iter__
    return self._execute_and_instances(context)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/orm/", line 2776, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/", line 914, in execute
    return meth(self, multiparams, params)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/sql/", line 323, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/", line 1010, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/", line 1146, in _execute_context
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/engine/", line 1341, in _handle_dbapi_exception
  File "/home/parag00991/anaconda2/lib/python2.7/site-packages/sqlalchemy/util/", 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/", line 1139, in _execute_context
ending with:
InternalError: (psycopg2.InternalError) current transaction is aborted, commands ignored until endf transaction block
 [SQL: 'SELECT AS pages_id, AS pages_name, pages.title AS pages_title, pages.u AS pages_url, pages.description AS pages_description, 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
Jan 09 2017 06:31
Can anyone please send me the link of the documentation for class
Parag Jain
Jan 09 2017 06:32
Thanks. The problem is solved.
Arpit Nandwani
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?
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
Jan 09 2017 14:10 in helpers
Arpit Nandwani
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
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
Jan 09 2017 17:20
@magdalenesuo are you doing it through the admin panel?
Jan 09 2017 17:21
@SaptakS yes
Saptak Sengupta
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..
Jan 09 2017 17:26
@SaptakS Ok. got it. Thanks
Satwik Kansal
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
Screenshot from 2017-01-09 23-05-44.png
Jan 09 2017 17:42
@satwikkansal Hey. Go to admin and turn on ticketing in modules. :smiley:
Satwik Kansal
Jan 09 2017 17:46
@magdalenesuo It works. Thanks a lot :smile: