0

I am trying to use Behave from terminal. Typing behave in terminal, I received an error,

Exception ImportError: No module named worker

File "features/environment.py", line 11, in <module>

from worker import glob, json

ImportError: No module named worker

I have made the change in my environment.py document and removed the from worker import glob, json.

However when I execute behave, I receive the same error. I closed terminal, reopened it. I closed the text editor (Atom) and reopened it. The error persists. When I restarted the computer, it finally reflected the changes. I do not want to restart the computer every time to get behave to show the document changes.

Why is this happening and what can be done?

Community
  • 1
  • 1
Eimi Okuno
  • 107
  • 8
  • This is probably wrong but could you confirm how you closed atom? Maybe you just minimized it and the changes never got committed? I'm not sure how or when atom commits changes. Is there an explicit save or does it continuously save changes? – KobeJohn Aug 26 '15 at 13:59
  • I just installed behave and setup the [demo feature + steps](https://github.com/behave/behave) on Windows 10. I added ```environment.py``` with ```def before_feature(context, feature): print('>>>> before feature <<<<')```. If I run behave, it prints. If I change the text and save it, it changes the text that prints. Does a basic setup like that work for you? If so, maybe there is something else going on? – KobeJohn Aug 26 '15 at 14:09
  • @kobejohn Yea, very strange - I have tested it with the demo feature + steps and it seems to work just fine... I did close the atom with cmd + q - that is Mac shortcut for terminating a program. – Eimi Okuno Aug 26 '15 at 14:45
  • Ah! this is embarrassing - I just realised that when I moved the file environment.py, I actually did not close and reopen the file, so I was editing a none existing file and was not saved... – Eimi Okuno Aug 26 '15 at 14:48
  • Glad you got it figured out. – KobeJohn Aug 26 '15 at 14:53

0 Answers0