Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Cannot do relative imports from outside the topology folder #184

Open
aapostol87 opened this issue Sep 9, 2016 · 0 comments
Open

Cannot do relative imports from outside the topology folder #184

aapostol87 opened this issue Sep 9, 2016 · 0 comments

Comments

@aapostol87
Copy link

aapostol87 commented Sep 9, 2016

I am trying to create a generic bolt outside the topology directory.
This is because I wanna use a storage factory and this applies for all my bolts.

When I build it it trows an error.

Let me paste my trace:
pyleus build: error: [VirtualenvError] Failed to execute Python module: train_topology.normalize_data_bolt. Error: Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/tmp/tmpnZDGeG/resources/train_topology/normalize_data_bolt.py", line 8, in
from src.tuples import Message
ImportError: No module named src.tuples

This is the folder structure:
.
├── bolt_testing.py
├── init_processing_bolt.py
├── requirements.txt
├── src
│   ├── bolts
│   │   ├── generic_bolt.py
│   │   ├── init.py
│   ├── init.py
│   ├── storage
│   │   ├── cassandra_storage_client.py
│   │   ├── generic_storage_client.py
│   │   ├── init.py
│   │   ├── mongo_db_storage_client.py
│   │   ├── storage_factory.py
│   ├── tuples.py
└── topologies
├── init.py
├── topology_one
│   ├── init.py
│   ├── normalize_data_bolt.py
└── topology_one.yaml

Is there any way of referencing classes outside the topology folder?

@aapostol87 aapostol87 changed the title Cannot do relative imports from outside the topology Cannot do relative imports from outside the topology folder Sep 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant