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

Cannot do relative imports from outside the topology folder #184

Description

@aapostol87

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions