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
Hi!
Great library - thanks for your work!
I'm hosting some Python 3.6 code on AWS Lambda and I have a strangely intermittent error (occurs about 80% of the time) with aspectlib weave on the Python Requests library. Here's the exception:
File "/var/task/aspectlib/__init__.py", line 413, in weave
weave(item, aspects, **options) for item in target
File "/var/task/aspectlib/__init__.py", line 413, in <listcomp>
weave(item, aspects, **options) for item in target
File "/var/task/aspectlib/__init__.py", line 505, in weave
return weave_instance(target, aspects, **options)
File "/var/task/aspectlib/__init__.py", line 554, in weave_instance
patch_module(instance, attr, _checked_apply(fixed_aspect, realfunc, module=None), **options)
File "/var/task/aspectlib/__init__.py", line 722, in patch_module
setattr(module, alias, replacement)
AttributeError: '__logged__' object attribute 'advising_function' is read-only
Never have a problem on my Ubuntu 18 dev machine. Don't have a problem on a normal hosting environment - such as an EC2 instance. This problem only seems to occur on AWS Lambda.
I have made a patch to catch the exception and debug log the error. Please see the pull request. The catch is not very specific; I wanted to avoid recording the rollback of the weave and the "seen = True" part.
The text was updated successfully, but these errors were encountered:
I suspect the actual problem is that that weave([Session.send], debug.log(stacktrace=False), lazy=True) is run multiple times in the same process and 20% of the time aws lambda spawns new process when running your code.
Hi!
Great library - thanks for your work!
I'm hosting some Python 3.6 code on AWS Lambda and I have a strangely intermittent error (occurs about 80% of the time) with aspectlib weave on the Python Requests library. Here's the exception:
Here's my weave call:
Never have a problem on my Ubuntu 18 dev machine. Don't have a problem on a normal hosting environment - such as an EC2 instance. This problem only seems to occur on AWS Lambda.
I have made a patch to catch the exception and debug log the error. Please see the pull request. The catch is not very specific; I wanted to avoid recording the rollback of the weave and the "seen = True" part.
The text was updated successfully, but these errors were encountered: