Skip to content

cannot import name 'Project' #135

@bugwz

Description

@bugwz

When i run pecan populate config/dev.py, i met the error:

(virtualenv) [shaman@142ba6b2f6af shaman]$ pecan populate config/dev.py
/home/shaman/virtualenv/lib/python3.6/site-packages/pecan/commands/base.py:51: RuntimeWarning: Unable to load plugin populate = shaman.commands.populate:PopulateCommand: cannot import name 'Project'
  warn("Unable to load plugin %s: %s" % (ep, e), RuntimeWarning)
usage: pecan [-h] [--version] command ...

positional arguments:
  command
    serve     Serves a Pecan web application
    shell     Open an interactive shell with the Pecan app loaded
    create    Creates the file layout for a new Pecan scaffolded project

optional arguments:
  -h, --help  show this help message and exit
  --version   show program's version number and exit

pecan: argument command: invalid choice: 'populate' (choose from 'serve', 'shell', 'create')
(virtualenv) [shaman@142ba6b2f6af shaman]$

My env is:

(virtualenv) [shaman@142ba6b2f6af shaman]$ pip --version
pip 21.3.1 from /home/shaman/virtualenv/lib/python3.6/site-packages/pip (python 3.6)
(virtualenv) [shaman@142ba6b2f6af shaman]$ python --version
Python 3.6.8
(virtualenv) [shaman@142ba6b2f6af shaman]$ pip list
Package            Version     Editable project location
------------------ ----------- -------------------------
alembic            0.8.6
beautifulsoup4     4.11.2
certifi            2022.12.7
chardet            4.0.0
CherryPy           8.9.1
decorator          5.1.1
enum34             1.1.10
greenlet           2.0.2
gunicorn           19.6.0
idna               2.10
importlib-metadata 4.8.3
ipython            5.0.0
ipython-genutils   0.2.0
Jinja2             2.11.3
logutils           0.3.5
Mako               1.1.6
MarkupSafe         2.0.1
mock               5.0.1
notario            0.0.16
pecan              1.4.0
pecan-notario      0.0.3
pexpect            4.8.0
pickleshare        0.7.5
pika               1.2.0
pip                21.3.1
projects           1.0.9
prompt-toolkit     1.0.18
psycopg2           2.8.6
ptyprocess         0.7.0
Pygments           2.14.0
python-editor      1.0.4
PyYAML             6.0
requests           2.25.1
setuptools         59.6.0
shaman             0.1         /home/shaman/shaman
simplegeneric      0.8.1
six                1.16.0
soupsieve          2.3.2.post1
SQLAlchemy         1.4.0
termcolor          1.1.0
traitlets          4.3.3
typing_extensions  4.1.1
urllib3            1.26.15
urwid              2.1.2
waitress           2.0.0
wcwidth            0.2.6
WebOb              1.8.7
WebTest            3.0.0
wheel              0.37.1
WSGIserver         1.3
zipp               3.6.0

I found the Project is shaman's local class, i don't know how to fix it. Please~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions