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

No module named mymodule #177

Open
vartagg opened this issue Jun 6, 2017 · 3 comments
Open

No module named mymodule #177

vartagg opened this issue Jun 6, 2017 · 3 comments
Projects

Comments

@vartagg
Copy link

vartagg commented Jun 6, 2017

When I create a new module "mymodule" and put it near pavement.py (at the same directory with it), then I cannot import this module from pavement.py.

pavement.py:
from mymodule import CONFIG

Python 2.7 Exception (Paver==1.2.4):
ImportError: No module named mymodule

Python 3.6 Exception (Paver==1.2.4):
ModuleNotFoundError: No module named 'mymodule'

@Almad
Copy link
Member

Almad commented Jun 6, 2017

@vartagg Is there anything else you've been doing to your PYTHONPATH? Are you using paver-minilib, installed Paver or virtualenv?

@vartagg
Copy link
Author

vartagg commented Jun 7, 2017

@Almad Only virtualenv used. Paver installed via pip

Code:

from paver.easy import *
from modules.config import CONFIG


@task
@consume_args
def echo(args):
    sh('echo {}'.format(args))


@task
def print_config():
    print(CONFIG)

Usage:

paver echo

@Almad
Copy link
Member

Almad commented Jun 20, 2017

@vartagg Is there anything else in the config than the CONFIG dictionary? Any imports there?

@Almad Almad added this to To Do in Paver 1.3 Dec 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Paver 1.3
  
To Do
Development

No branches or pull requests

2 participants