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

Windows support broken due to gunicorn #38

Closed
BYK opened this issue May 7, 2020 · 6 comments · Fixed by #40
Closed

Windows support broken due to gunicorn #38

BYK opened this issue May 7, 2020 · 6 comments · Fixed by #40
Labels
bug Something isn't working

Comments

@BYK
Copy link

BYK commented May 7, 2020

#36 switched to Gunicorn which is not supported on Windows. So as of 1.4.0, functions-framework is not usable on Windows.

@di
Copy link
Member

di commented May 7, 2020

@BYK, sorry for the trouble. Can you share exactly what error you're getting?

For now, you should be able to work around this with the --debug flag, which uses Flask's built-in HTTP server instead.

@BYK
Copy link
Author

BYK commented May 7, 2020

For now, you should be able to work around this with the --debug flag, which uses Flask's built-in HTTP server instead.

I think that may need to be the default or needs to be advertised for local development scenarios.

That being said, I cannot even run --help as it imports gunicorn by default, which tries to import fcntl and fails there :)

@BYK
Copy link
Author

BYK commented May 7, 2020

Full error and stack trace:

$ functions-framework --help
Traceback (most recent call last):
  File "C:\<redacted>\Python38\lib\runpy.py", line 193, in _run_module_as
_main
    return _run_code(code, main_globals, None,
  File "C:\<redacted>\Python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\<redacted>\Scripts\functions-framework.exe\__main__.py", line
4, in <module>
  File "c:\<redacted>\lib\site-packages\functions_framework\_cli.py", lin
e 20, in <module>
    from functions_framework._http import create_server
  File "c:\<redacted>\lib\site-packages\functions_framework\_http.py", li
ne 15, in <module>
    import gunicorn.app.base
  File "c:\<redacted>\lib\site-packages\gunicorn\app\base.py", line 11, i
n <module>
    from gunicorn import util
  File "c:\<redacted>\lib\site-packages\gunicorn\util.py", line 9, in <mo
dule>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'

@di
Copy link
Member

di commented May 7, 2020

Got it, sorry about that. In that case, you can pin to functions-framework==1.3.0 for now.

@di di added the bug Something isn't working label May 7, 2020
@BYK
Copy link
Author

BYK commented May 7, 2020

@di yup, that's what I did. Thanks! :)

@di
Copy link
Member

di commented May 8, 2020

Fixed in functions-framework==1.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants