Skip to content

Commit

Permalink
docs: Fix import error.
Browse files Browse the repository at this point in the history
```
Running Sphinx v1.8.5
loading translations [en]... done

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 472, in load_extension
    mod = __import__(extname, None, None, ['setup'])
  File "/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/checkouts/latest/doc/_exts/sdcdomain/__init__.py", line 1, in <module>
    from sdcdomain import setup
ImportError: cannot import name 'setup' from 'sdcdomain' (/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/checkouts/latest/doc/_exts/sdcdomain/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 303, in build_main
    args.tags, args.verbosity, args.jobs, args.keep_going)
  File "/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 228, in __init__
    self.setup_extension(extension)
  File "/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 449, in setup_extension
    self.registry.load_extension(self, extname)
  File "/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 475, in load_extension
    raise ExtensionError(__('Could not import extension %s') % extname, err)
sphinx.errors.ExtensionError: Could not import extension sdcdomain (exception: cannot import name 'setup' from 'sdcdomain' (/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/checkouts/latest/doc/_exts/sdcdomain/__init__.py))

Extension error:
Could not import extension sdcdomain (exception: cannot import name 'setup' from 'sdcdomain' (/home/docs/checkouts/readthedocs.org/user_builds/mithro-vtr/checkouts/latest/doc/_exts/sdcdomain/__init__.py))
```
  • Loading branch information
mithro committed Apr 3, 2019
1 parent 44c6840 commit 79e0b9c
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 87 deletions.
34 changes: 33 additions & 1 deletion doc/_exts/archdomain/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
from archdomain import setup
from sphinxcontrib.domaintools import custom_domain
from sphinx.util.docfields import *

def setup(app):
app.add_domain(custom_domain('ArchDomain',
name = 'arch',
label = "FPGA Architecture",

elements = dict(
tag = dict(
objname = "Attribute",
indextemplate = "pair: %s; Tag Attribute",
fields = [
GroupedField('required_parameter',
label = "Required Attributes",
names = [ 'req_param' ]),
GroupedField('optional_parameter',
label = "Optional Attributes",
names = [ 'opt_param' ]),
Field('required',
label = "Tag Required",
names = [ 'required' ])
]
),
#var = dict(
#objname = "Make Variable",
#indextemplate = "pair: %s; Make Variable"
#),
#expvar = dict(
#objname = "Make Variable, exported",
#indextemplate = "pair: %s; Make Variable, exported"
#)
)))
33 changes: 0 additions & 33 deletions doc/_exts/archdomain/archdomain.py

This file was deleted.

26 changes: 25 additions & 1 deletion doc/_exts/rrgraphdomain/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
from rrgraphdomain import setup
from sphinxcontrib.domaintools import custom_domain
from sphinx.util.docfields import *

def setup(app):
app.add_domain(custom_domain('RRGraphDomain',
name = 'rrgraph',
label = "Routing Resource Graph",

elements = dict(
tag = dict(
objname = "Attribute",
indextemplate = "pair: %s; Tag Attribute",
fields = [
GroupedField('required_parameter',
label = "Required Attributes",
names = [ 'req_param' ]),
GroupedField('optional_parameter',
label = "Optional Attributes",
names = [ 'opt_param' ]),
Field('required',
label = "Tag Required",
names = [ 'required' ])
]
),
)))
25 changes: 0 additions & 25 deletions doc/_exts/rrgraphdomain/rrgraphdomain.py

This file was deleted.

27 changes: 26 additions & 1 deletion doc/_exts/sdcdomain/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
from sdcdomain import setup
from sphinxcontrib.domaintools import custom_domain
from sphinx.util.docfields import *

def setup(app):
app.add_domain(custom_domain('SdcDomain',
name = 'sdc',
label = "SDC",

elements = dict(
command = dict(
objname = "SDC Command",
indextemplate = "pair: %s; SDC Command",
),
option = dict(
objname = "SDC Option",
indextemplate = "pair: %s; SDC Option",
),
#var = dict(
#objname = "Make Variable",
#indextemplate = "pair: %s; Make Variable"
#),
#expvar = dict(
#objname = "Make Variable, exported",
#indextemplate = "pair: %s; Make Variable, exported"
#)
)))
26 changes: 0 additions & 26 deletions doc/_exts/sdcdomain/sdcdomain.py

This file was deleted.

0 comments on commit 79e0b9c

Please sign in to comment.