Importing /opt/stack into pydev

asked 2014-08-12 19:47:30 -0600

dglaser gravatar image

What settings shold I use to import the /opt/stack into Eclipse - pydev to avoid unresolved imports?

I used devstack to build my environment and now I want to peruse the code and trace execution. Unfortunately eclipse/pydef has problems resolving imports.

For example, the nova.db.sqlalchemy.models module can seem to find the oslo.config module and flags the following import as an error

from oslo.config import cfg

The error is "unresolved import: cfg". The error occurs at line 27 of the models module (models.py).

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-12 21:50:17 -0600

fifieldt gravatar image

There's a good article from Adam Young at http://adam.younglogic.com/2012/12/ke... where he walks through how to work with Keystone in pydev. I hope that helps set up at least one project correctly for you.

Take a look also at this question: https://ask.openstack.org/en/question...

and also this blog about neutron: http://emaganap.wordpress.com/2013/08...

Your particular error is related to your PYTHONPATH settings in eclipse. Ensure that the PYTHONPATH contains the directory where oslo.config lives for nova.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2014-08-12 19:47:30 -0600

Seen: 244 times

Last updated: Aug 12 '14