-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ModuleNotFoundError: No module named 'worlds' while running server.py #2833
Comments
Looks like the PersonaChat task needs some upgrades. My guess is that the import should be upgraded to |
Small nit: Idk if cc @JackUrb for the wider issue. |
That worked! Thanks! Feel free to close this issue or keep it open. |
Would you mind submitting a patch? Would be great to have this fixed for everyone. |
I'm sorry, I'm not proficient enough with git to have the know-how to do so. But as you said that will require a (simple) change in all the "tasks" folder, I guess. |
can you run |
I hope it doesn't catch some unnecessary changes I did: diff --git a/parlai/mturk/tasks/personachat/personachat_chat/run.py b/parlai/mturk/tasks/personachat/personachat_chat/run.py
index e5553c8b..3a474dbc 100644
--- a/parlai/mturk/tasks/personachat/personachat_chat/run.py
+++ b/parlai/mturk/tasks/personachat/personachat_chat/run.py
@@ -5,8 +5,8 @@
# LICENSE file in the root directory of this source tree.
from parlai.core.params import ParlaiParser
from parlai.mturk.core.mturk_manager import MTurkManager
-from worlds import PersonaChatWorld, PersonaProfileWorld, PersonasGenerator
-from task_config import task_config
+from .worlds import PersonaChatWorld, PersonaProfileWorld, PersonasGenerator
+from .task_config import task_config
import os
diff --git a/parlai/mturk/tasks/personachat/personachat_chat/worlds.py b/parlai/mturk/tasks/personachat/personachat_chat/worlds.py
index 7a45a7a0..5f8dd2b7 100644
--- a/parlai/mturk/tasks/personachat/personachat_chat/worlds.py
+++ b/parlai/mturk/tasks/personachat/personachat_chat/worlds.py
@@ -7,7 +7,7 @@ from parlai.mturk.core.worlds import MTurkOnboardWorld
from parlai.mturk.core.agents import TIMEOUT_MESSAGE
from parlai.core.worlds import validate, MultiAgentDialogWorld
from joblib import Parallel, delayed
-from extract_and_save_personas import main as main_extract
+from .extract_and_save_personas import main as main_extract
import numpy as np
import time
import os The only change relevant to this issue is adding the a dot before the files. |
Thanks! |
This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening. |
Bug description
Running the server.py script result in module no found error.
Reproduction steps
python setup.py development
python server.py --sandbox
Expected behavior
The server is showing in http://localhost:8095 but when trying to click on a task I'm running into the error below in the screenshot.
Screenshots
The text was updated successfully, but these errors were encountered: