You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since v0.24.0, default SkygearContainer.send_action is injected after py-skygear init and load the config from envvar. If the user created an instance before the config finished, the transport can be None and calling of send_cation will result in following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/skygear/transmitter/common.py", line 40, in wrapper
return dict(result=f(self, *args, **kwargs))
File "/usr/local/lib/python3.4/site-packages/skygear/transmitter/common.py", line 102, in call_func
return self.hook(obj, param)
File "/usr/local/lib/python3.4/site-packages/skygear/transmitter/common.py", line 180, in hook
returned = func(record, original_record, conn)
File "/usr/local/lib/python3.4/site-packages/skygear/decorators.py", line 85, in hook_func
func(record, original_record, db)
File "./skygear_plugins/tailor_image_resizing.py", line 104, in after_save_product_image
DB_TABLES.get('product')
File "./skygear_plugins/tailor_image_resizing.py", line 136, in resize_image_and_save_to_skygear_db
image_url = get_image_url(record, field, table)
File "./skygear_plugins/tailor_image_resizing.py", line 197, in get_image_url
response = container.send_action('record:query', data)
File "/usr/local/lib/python3.4/site-packages/skygear/container.py", line 106, in send_action
resp = self.transport.send_action(action_name, payload, url, timeout)
AttributeError: 'NoneType' object has no attribute 'send_action'
Skygear Server Date/Version: v1.1.0
Application Platform:
Is this a regression?
Attached logs, screenshots
Expected Results
Tell the dev the transport is not ready at the instantiation time.
Actual Results
Meaningless error message of AttributeError.
The text was updated successfully, but these errors were encountered:
Developer will write code like this.
Since v0.24.0, default
SkygearContainer.send_action
is injected after py-skygear init and load the config from envvar. If the user created an instance before the config finished, thetransport
can be None and calling ofsend_cation
will result in following exception:Expected Results
Tell the dev the transport is not ready at the instantiation time.
Actual Results
Meaningless error message of AttributeError.
The text was updated successfully, but these errors were encountered: