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

27th
Jan 2019
rajshah9914
@rajshah9914
Jan 27 04:45
Hello everyone, can anyone here get me out of this error..(Step 5) while setting the system on my local machine. 'python create_db.py' command does not run and gives a runtime error.. As it says , do I need to modify any code in create_db.py file??

rajshah9914@rajshah9914:~/Desktop/open-event-server$ python create_db.py
Traceback (most recent call last):
File "create_db.py", line 7, in <module>
from app import current_app
File "/home/rajshah9914/Desktop/open-event-server/app/init.py", line 26, in <module>
from app.api.helpers.jwt import jwt_authenticate, jwt_identity
File "/home/rajshah9914/Desktop/open-event-server/app/api/init.py", line 1, in <module>
from app.api.bootstrap import api
File "/home/rajshah9914/Desktop/open-event-server/app/api/bootstrap.py", line 6, in <module>
api = Api(app, api_v1)
File "/home/rajshah9914/anaconda3/lib/python3.6/site-packages/flask_rest_jsonapi/api.py", line 31, in init
self.init_app(app, blueprint)
File "/home/rajshah9914/anaconda3/lib/python3.6/site-packages/flask_rest_jsonapi/api.py", line 51, in init_app
self.app.register_blueprint(self.blueprint)
File "/home/rajshah9914/anaconda3/lib/python3.6/site-packages/werkzeug/local.py", line 347, in getattr
return getattr(self._get_current_object(), name)
File "/home/rajshah9914/anaconda3/lib/python3.6/site-packages/werkzeug/local.py", line 306, in _get_current_object
return self.__local()
File "/home/rajshah9914/anaconda3/lib/python3.6/site-packages/flask/globals.py", line 51, in _find_app
raise RuntimeError(_app_ctx_err_msg)
RuntimeError: Working outside of application context.

This typically means that you attempted to use functionality that needed
to interface with the current application object in some way. To solve
this, set up an application context with app.app_context(). See the
documentation for more information.

Uddeshya Singh
@uds5501
Jan 27 07:42

@CosmicCoder96 @mariobehling Can someone guide me in a doubt?

I want to add a new column named is_featured in the event schema and model. This is_featured is similar to the one in speaker model.
I naively modified the models and schemas for event along the lines of speaker model and schema and was greeted by the following error when trying to run the open-event-frontend:

```

sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) column events.is_featured does not exist
LINE 1: ...s_donation_enabled AS events_is_donation_enabled, events.is_...
                                                             ^
 [SQL: 'SELECT events.deleted_at AS events_deleted_at, events.id AS events_id, events.identifier AS events_identifier, events.name AS events_name, events.external_event_url AS events_external_event_url, events.logo_url AS events_logo_url, events.starts_at AS events_starts_at, events.ends_at AS events_ends_at, events.timezone AS events_timezone, events.is_event_online AS events_is_event_online, events.latitude AS events_latitude, events.longitude AS events_longitude, events.location_name AS events_location_name, events.searchable_location_name AS events_searchable_location_name, events.description AS events_description, events.original_image_url AS events_original_image_url, events.thumbnail_image_url AS events_thumbnail_image_url, events.large_image_url AS events_large_image_url, events.icon_image_url AS events_icon_image_url, events.organizer_name AS events_organizer_name, events.is_map_shown AS events_is_map_shown, events.has_organizer_info AS events_has_organizer_info, events.organizer_description AS events_organizer_description, events.is_sessions_speakers_enabled AS events_is_sessions_speakers_enabled, events.privacy AS events_privacy, events.state AS events_state, events.event_type_id AS events_event_type_id, events.event_topic_id AS events_event_topic_id, events.event_sub_topic_id AS events_event_sub_topic_id, events.events_orga_id AS events_events_orga_id, events.ticket_url AS events_ticket_url, events.code_of_conduct AS events_code_of_conduct, events.schedule_published_on AS events_schedule_published_on, events.is_ticketing_enabled AS events_is_ticketing_enabled, events.is_donation_enabled AS events_is_donation_enabled, events.is_featured AS events_is_featured, events.payment_country AS events_payment_country, events.payment_currency AS events_payment_currency, events.paypal_email AS events_paypal_email, events.is_tax_enabled AS events_is_tax_enabled, events.can_pay_by_paypal AS events_can_pay_by_paypal, events.can_pay_by_stripe AS events_can_pay_by_stripe, events.can_pay_by_cheque AS events_can_pay_by_cheque, events.can_pay_by_bank AS events_can_pay_by_bank, events.can_pay_onsite AS events_can_pay_onsite, events.cheque_details AS events_cheque_details, events.bank_details AS events_bank_details, events.onsite_details AS events_onsite_details, events.created_at AS events_created_at, events.pentabarf_url AS events_pentabarf_url, events.ical_url AS events_ical_url, events.xcal_url AS events_xcal_url, events.is_sponsors_enabled AS events_is_sponsors_enabled, events.refund_policy AS events_refund_policy, events.order_expiry_time AS events_order_expiry_time, events.is_stripe_linked AS events_is_stripe_linked, events.discount_code_id AS events_discount_code_id \nFROM events, users_events_roles JOIN roles ON roles.id = users_events_roles.role_id AND roles.name = %(name_1)s \nWHERE %(param_1)s = users_events_roles.user_id AND users_events_roles.event_id = events.id'] [parameters: {'param_1': 8, 'name_1': 'registrar'}]
How do I by-pass this?
rajshah9914
@rajshah9914
Jan 27 13:36
Stuck in my installations, can't move ahead due to this.. An assist required..