yasoob / practical-python-projects

99 stars 42 forks source link

NameError: name 'os' is not defined #17

Closed PeterHuynh closed 3 years ago

PeterHuynh commented 3 years ago

Location Within the Book

Hint: Page numbers change all the time. The best way to report an issue is by chapter and section numbers.

Description

I run the app.py on windows10 and need to import os

If code-related, enter it within these backticks. Otherwise, delete this segment.

\app.py", line 13, in <module>
    port = int(os.environ.get("PORT", 5000))
NameError: name 'os' is not defined

Possible Solutions

import os in app.py

Your full name so I can provide accurate credit within the book

Peter Huynh

yasoob commented 3 years ago

Hey Peter, so sorry for such a delayed update. COVID had me struggling for a bit but this bug is fixed in the latest version that will go out soon. Thanks ❤️