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

NameError: name 'basestring' is not defined #8

Open
NathanUrwin opened this issue Feb 28, 2018 · 2 comments
Open

NameError: name 'basestring' is not defined #8

NathanUrwin opened this issue Feb 28, 2018 · 2 comments

Comments

@NathanUrwin
Copy link

NathanUrwin commented Feb 28, 2018

(env) $ python --version
Python 3.6.4

(env) $ pip --version
pip 9.0.1 from /home/user/Projects/.sandbox/python-tdd-book/env/lib/python3.6/site-packages (python 3.6)

(env) $ pip freeze
chromedriver-binary==2.35.0
Django==2.0.2
Pygments==2.2.0
pytz==2018.3
redgreenunittest==0.1.1
selenium==3.9.0

(env) $ python functional_tests.py
Traceback (most recent call last):
  File "functional_tests.py", line 62, in <module>
    unittest.main()
  File "/home/user/Projects/.sandbox/python-tdd-book/env/lib/python3.6/site-packages/redgreenunittest/main.py", line 78, in __init__
    if isinstance(module, basestring):
NameError: name 'basestring' is not defined

Here's a solution to a similar issue in another project

@stevematney
Copy link
Owner

Hi @NathanUrwin! Thanks for the report! This is all really helpful. Would it be possible to provide a very small test and code example to duplicate this error?

@NathanUrwin
Copy link
Author

Hey @stevematney 👋 Glad to help! For sure, check out the functional_tests.py. I'm farther along in the tutorial now where instead of calling python functional_tests.py the tests are ran through the Django test runner, i.e. python manage.py test functional_tests and everything is working great! 👌

keckj added a commit to keckj/redgreenunittests that referenced this issue Feb 1, 2021
stevematney added a commit that referenced this issue Feb 23, 2021
Fix issue #8 by using six.stringtypes instead of basestring
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