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

import EX_CANTCREAT means datasette fails to work on Windows #1094

Closed
drkane opened this issue Nov 14, 2020 · 1 comment · Fixed by #1128
Closed

import EX_CANTCREAT means datasette fails to work on Windows #1094

drkane opened this issue Nov 14, 2020 · 1 comment · Fixed by #1128

Comments

@drkane
Copy link

drkane commented Nov 14, 2020

Trying to use datasette 0.51.1 gives the following error:

ImportError: cannot import name 'EX_CANTCREAT' from 'os' (C:\Users\drkan\AppData\Local\Programs\Python\Python39\lib\os.py)

Looks like that code is only available on unix: https://docs.python.org/3/library/os.html#os.EX_CANTCREAT

Removing the line makes it work fine (EX_CANTCREAT doesn't seem to be used anywhere?)

@bapowell
Copy link

I can confirm this issue, running version 0.51.1 under Windows.

Fixed by commenting out the following line near the top of datasette\utils\asgi.py :

#from os import EX_CANTCREAT

abdusco added a commit to abdusco/datasette that referenced this issue Dec 4, 2020
Fixes simonw#1094

This import isn't used at all, and causes error on startup on Windows.
simonw pushed a commit that referenced this issue Dec 5, 2020
Fixes #1094

This import isn't used at all, and causes error on startup on Windows.
simonw added a commit that referenced this issue Dec 5, 2020
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

Successfully merging a pull request may close this issue.

2 participants