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

Under the duplicate directory, rasa SDK import actions will make an error #595

Closed
WangxuP opened this issue Nov 17, 2021 · 6 comments
Closed
Labels
area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK stale type:bug 🐛 Something isn't working

Comments

@WangxuP
Copy link

WangxuP commented Nov 17, 2021

Rasa version:
1.10.8
Rasa SDK version:
1.10.3
Python version:
3.7.7
Operating system (windows, osx, ...):
windows、linux
Issue:
Under the duplicate directory, rasa SDK import actions will make an error
My directory structure is as follows:
E:.
├─actions
│ ├─custom_collection
│ │ └─... ...
│ ├─tools
│ │ └─tools.py
└─tools
└─logger_control.py

I've omitted other things that have nothing to do with bugs。
According to the above directory structure, an error will appear when I start rasa action,error as follows:

Error (including full traceback):

2021-11-17 17:53:08 ERROR    rasa_sdk.executor  - Failed to register package 'actions'.
Traceback (most recent call last):
  File "D:\Program Files\Python37\lib\site-packages\rasa_sdk\executor.py", line 256, in register_package
    self._import_submodules(package)
  File "D:\Program Files\Python37\lib\site-packages\rasa_sdk\executor.py", line 219, in _import_submodules
    self._import_module(full_name)
  File "D:\Program Files\Python37\lib\site-packages\rasa_sdk\executor.py", line 233, in _import_module
    module = importlib.import_module(name)
  File "D:\Program Files\Python37\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'actions.tools.logger_control'

Command or request that led to error:

python rasa run actions --port 5056 --actions actions

Content of configuration file (config.yml) (if relevant):

Content of domain file (domain.yml) (if relevant):

Contents of actions.py (if relevant):

@WangxuP WangxuP added area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK type:bug 🐛 Something isn't working labels Nov 17, 2021
WangxuP added a commit to WangxuP/rasa-sdk that referenced this issue Nov 17, 2021
@sara-tagger
Copy link

Thanks for raising this issue, @koaning will get back to you about it soon✨

Please also check out the docs and the forum in case your issue was raised there too 🤗

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@stale
Copy link

stale bot commented Apr 28, 2022

This issue has been automatically closed due to inactivity. Please create a new issue if you need more help.

@stale stale bot closed this as completed Apr 28, 2022
@indam23
Copy link
Contributor

indam23 commented May 25, 2022

@WangxuP Can you provide some more details about the structure of your action code? The directory structure itself doesn't cause an error, are there imports in some of the files that cause this?
I'm following up here although it's closed since I see your PR here is still open.

@WangxuP
Copy link
Author

WangxuP commented May 26, 2022

@WangxuP Can you provide some more details about the structure of your action code? The directory structure itself doesn't cause an error, are there imports in some of the files that cause this? I'm following up here although it's closed since I see your PR here is still open.

My directory structure is as follows:

tree
E:.
├─actions
│ ├─custom_collection
│ │ └─__pycache__
│ ├─tools
│ │ └─__pycache__
│ └─__pycache__
├─configs
│ └─__pycache__
├─data_models
│ ├─faq_es_data
│ ├─fuzzymatching_data
│ ├─models
│ │ └─bert_finetune
│ └─rbt3_pytorch
├─data_train
│ ├─lookup_tables
│ ├─stories
│ └─train_nlu_data
├─docs
├─fuzzy_maching
│ └─__pycache__
├─logs
├─pipeline_task_assemble
│ └─__pycache__
├─pipeline_task_rasa
│ └─__pycache__
├─qa_server
│ ├─qa_doc
│ ├─qa_graph
│ ├─qa_knowledge
│ │ └─__pycache__
│ ├─tools
│ │ └─__pycache__
│ └─__pycache__
├─rasa_custom
│ ├─core
│ │ ├─channel
│ │ └─policies
│ │ └─__pycache__
│ ├─data
│ │ └─jieba
│ │ └─jieba_custom_dics
│ └─nlu
│ ├─classifiers
│ │ ├─finetunecllection
│ │ │ └─__pycache__
│ │ └─__pycache__
│ ├─featurizers
│ │ └─spare_featurizer
│ ├─selectors
│ └─tokenizers
├─tools
│ └─__pycache__
└─__pycache__

@indam23
Copy link
Contributor

indam23 commented May 27, 2022

I mean the structure of the code itself i.e. what module is importing what module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK stale type:bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants