Got 'ImportError' when build doc

Bug #1654190 reported by Eric Xie
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Invalid
Undecided
Unassigned

Bug Description

Description
===========
Got 'ImportError' when i built ironic's documents with command ``tox -edocs``.

Steps to reproduce
==================
* tox -edocs

Expected result
===============
No error prompt.

Actual result
=============
Got 'ImportError'.

Environment
===========
# git log
commit 9842f401874f4010762afb45d4263e109614b193
Merge: 1cb779e 4fa2412
Author: Jenkins <email address hidden>
Date: Wed Jan 4 12:18:27 2017 +0000

    Merge "Create a table to track loaded interfaces"

Logs
===========
/work/ironic-master/doc/source/api/ironic.nova.compute.manager.rst:4: WARNING: autodoc: failed to import module u'ironic.nova.compute.manager'; the following exception was raised:
Traceback (most recent call last):
  File "/work/ironic-master/.tox/venv/lib/python2.7/site-packages/sphinx/ext/autodoc.py", line 386, in import_object
    __import__(self.modname)
  File "/work/ironic-master/ironic/nova/compute/manager.py", line 31, in <module>
    from nova.i18n import _LW
ImportError: No module named i18n

Eric Xie (eric-xie)
description: updated
Revision history for this message
Dmitry Tantsur (divius) wrote :

Please try rebuilding your environment with adding -r flag to the tox call. I've just rebuilt docs via 'tox -edocs -r' successfully.

Changed in ironic:
status: New → Incomplete
Revision history for this message
Eric Xie (eric-xie) wrote :

I tried the latest code and found this issue also exist.

commit eae8e07132edf00bc5b51aa8342ad22ab3c2cc60
Author: Jim Rollenhagen <email address hidden>
Date: Fri Jan 20 20:30:09 2017 +0000

    Fix api-ref warnings

    A few missing parameters breaking the build on latest api-ref package,
    fix them.

    Change-Id: I7769844b8a766c78418c28991b97827014886ec4
    Closes-Bug: #1658187

Revision history for this message
Eric Xie (eric-xie) wrote :

@dmitry, was the package 'nova' installed in your environment?

I think that the 'nova' package should be included in requirement.txt.

Revision history for this message
Ramamani Yeleswarapu (ramamani-yeleswarapu) wrote :

Eric, this error cannot be reproduced; building docs succeeds. I've tested it after this commit: https://github.com/openstack/ironic/commit/4c61f1ac1828859ae5f76cd91c382cfb215bc412

Revision history for this message
Eric Xie (eric-xie) wrote :

@Ramamani, i reproduced this issue with the latest code, and fount it has been gone.
So i changed this bug to 'invalid'.

Changed in ironic:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.