Skip to content
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

Disable generating the parser.out file in production #208

Open
haggag opened this issue Oct 14, 2018 · 1 comment
Open

Disable generating the parser.out file in production #208

haggag opened this issue Oct 14, 2018 · 1 comment

Comments

@haggag
Copy link

haggag commented Oct 14, 2018

The parser.out file is used for debugging. In production, it's not needed. And it's generating write errors for environments like AWS Lambda where the file system is read only (i.e. the default path is read only '/var/task/flanker/addresslib/_parser/parser.out')

To disable that, pass debug=False to yacc.yacc's constructor.

flupzor pushed a commit to maykinmedia/flanker that referenced this issue Sep 9, 2019
By default the ply/yacc parser generator runs in debug mode. This
creates a parser.out file in the directory parser.py is located. The
user which runs flanker does not always have access to this directory,
which causes 'permission denied errors.'
thrawn01 added a commit that referenced this issue Oct 22, 2019
@kanekv
Copy link

kanekv commented Jan 29, 2020

Even with this patch I'm getting errors:

 "Couldn't create 'flanker.addresslib._parser.url_parsetab'. [Errno 30] Read-only file system: '/env/local/lib/python3.7/site-packages/flanker/addresslib/_parser/url_parsetab.py'"  

This seems to be relevant: ivelum/djangoql#53
Also does it need write_tables=False too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants