-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
KeyError: 'builtins' #3761
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
Comments
This is almost always caused by something in the mypy installation. It's not easy to debug without sitting next to you. |
I tried installing it using both: I am using Windows 10 and Python 3.5.2 (from python.org). |
I you can isolate your codebase down into a minimal example that reproduces the problem and share it, that would be helpful. You can also try re-running mypy with verbose mode enabled: do Incidentally, does your project have a module or file named |
I ran it on a single file, which I've had extracted from the workspace, so that other files don't get imported by accident. It's content: import datetime
def iso_to_gregorian(iso_year: int, iso_week: int, iso_day: int):
fourth_jan = datetime.date(iso_year, 1, 4)
_, fourth_jan_week, fourth_jan_day = fourth_jan.isocalendar()
return fourth_jan + datetime.timedelta(days=iso_day-fourth_jan_day, weeks=iso_week-fourth_jan_week) What I've got after running
And answering your question:
No, it doesn't. |
@nme01 I have a couple ideas. I've had issues where if I install via pip then install again from git, it can cause conflicts. Can you run |
@nme01 Could you try |
Solved in #3991 |
When I ran
mypy
using the following command:I got the following error:
The text was updated successfully, but these errors were encountered: