Getting error while running nosetests in ex 47?

When I ran nosetests for ex 47 I got an error. The error is -

E

ERROR: Failure: SyntaxError (invalid syntax (ex47_tests.py, line 2))

Traceback (most recent call last):
File “c:\users\amisha singh\appdata\local\programs\python\python37-32\lib\site-packages\nose\failure.py”, line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File “c:\users\amisha singh\appdata\local\programs\python\python37-32\lib\site-packages\nose\loader.py”, line 418, in loadTestsFromName
addr.filename, addr.module)
File “c:\users\amisha singh\appdata\local\programs\python\python37-32\lib\site-packages\nose\importer.py”, line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File “c:\users\amisha singh\appdata\local\programs\python\python37-32\lib\site-packages\nose\importer.py”, line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File “C:\Users\AMISHA SINGH.venvs\Documents\Py\lib\imp.py”, line 234, in load_module
return load_source(name, filename, file)
File “C:\Users\AMISHA SINGH.venvs\Documents\Py\lib\imp.py”, line 171, in load_source
module = _load(spec)
File “”, line 696, in _load
File “”, line 677, in _load_unlocked
File “”, line 724, in exec_module
File “”, line 860, in get_code
File “”, line 791, in source_to_code
File “”, line 219, in _call_with_frames_removed
File “C:\Users\AMISHA SINGH\projects\ex47\tests\ex47_tests.py”, line 2
import ex47.game import Room
^
SyntaxError: invalid syntax


Ran 1 test in 0.070s

FAILED (errors=1)

I have installed ex 47 module then uninstalled it. But whenever I am running nosetests I am getting the error. I tried 3-4 times figuring it out. But I am stuck. Help me.

Take it easy. The last line above “Ran 1 test” is the most important, that means you have somewhere wrong typed. Check it again.
And you need to share your ex 47_test.py screenshots so we can see where the mistake is.
Don’t forget to come back and post your update.

Yes, @Dorsche has the right idea. Remember that when you get an error it’s not always on that line, but could be above it. In this case, you have to be careful what you type. How do you do an import?

import X import Y?

OR

import X from Y

Thank you @Dorsche and @zedshaw. I will share the screenshots later on. I have done this one import - import X import Y

Hello I have solved the problem. As @zedshaw mentioned two import option that were:

(i) import X import Y
or
(ii) from X import Y

I have done the first one and that was the main problem. I changed that and now I got no error.

And here is my successful nosetest

Great, and remember, these aren’t two “options” as the first one is incorrect syntax. The two options for importing are:

import X

or

from X import Y