-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rply causes a crash on read-only filesystems #1598
Comments
You can disable bytecode compilation by setting the environment variable PYTHONDONTWRITEBYTECODE. The real bug here is that we're ignoring |
Still got the same error :/ |
I don't think byte-compilation should be the issue, because Hy's call to By the way, @daniel-severo, this probably isn't your problem here, but it's a Bad Idea to have a Python module and a Hy module with the same name in the same directory, especially when that name is |
The first thing to do here is probably to see how to convince AWS Lambda to give you the stack trace. |
@Kodiologist yeah, I'm gonna remove one of them. I'll try to investigate it further. |
@kirbyfan64 not respecting |
Looks like the bytecode generation wasn't the problem. For some reason, after generating python code with from hy.core.language import complement, distinct, drop_while, first, inc, iterate, last, reduce, take_while Maybe something in the importer is trying to write data somewhere. |
Did you get a traceback? https://docs.aws.amazon.com/lambda/latest/dg/python-exceptions.html |
I was unable to get any more logging information from aws lambda. Although, strangely enough, ti looks like it breaks BEFORE the actual import statement. print("before everything")
from hy.core.language import complement, distinct, drop_while, first, inc, iterate, last, reduce, take_while
|
I was able to get a stack trace by putting the
It seems that the guilty code is in |
We can write to /tmp on AWS lambda ... We could have a way to configure where is the cache located (independently of the fact that it should write on read-only fs ..) |
@daniel-severo Did upgrading |
Sort of. It enabled me to deploy my code to aws lambda as long as I don't use anything from the shadow library. For some reason it acusses that the module isn't available. Since I use toolz most of the time, this wasn't such a big issue. |
That sounds like it could be another bug. Try opening a new issue for it. Let's keep this one open till a new rply is out. |
I currently have the following file setup on AWS Lambda:
handlers.py
hello.hy
AWS lambda calls the
hello
function insidehandlers.py
. My objective was to use this file as a proxy for writing aws lambda functions with hylang. But I keep getting this error when executing it in production:(the number 1059 varies)
I think this is due to the AST compiling on importing
hy
inhandlers.py
. AWS lambda does not permit that directory to be written.Any way that this could be circumvented?
The text was updated successfully, but these errors were encountered: