carlos-jenkins / plantweb

Plantweb is a Python client for the PlantUML server -
https://plantweb.readthedocs.io/
Apache License 2.0
27 stars 15 forks source link

AttributeError: 'BuildEnvironment' object has no attribute 'confdir' #9

Closed staylorx closed 7 years ago

staylorx commented 7 years ago

Using the file format in a sphinx-docs project:

.. uml:: /uml/deploy-prd.uml

The following error occurs:

Exception occurred:
  File "c:\python27\lib\site-packages\plantweb\directive.py", line 119, in run
    srcpath = join(env.confdir, srcfile)
AttributeError: 'BuildEnvironment' object has no attribute 'confdir'
The full traceback has been saved in c:\users\taylors\appdata\local\temp\sphinx-err-_wwbww.log, if you want to report the issue to the developers.
carlos-jenkins commented 7 years ago

Hi, thanks for reporting this.

Could you please specify the version of Sphinx you're using? It looks like they broke their public API on their side:

http://www.sphinx-doc.org/en/stable/extdev/envapi.html#sphinx.environment.BuildEnvironment.confdir

You can check the version with:

sphinx-quickstart --version

I can confirm the issue isn't present in 1.4.8 (which is a little bit old - August 2016).

Regards

carlos-jenkins commented 7 years ago

I was able to reproduce the issue in 1.6.3 AND in 1.4.8. I forgot to test the absolute path (relative to conf.py) and instead tested the relative path (relative to the .rst document).

Will work on a fix ASAP.

carlos-jenkins commented 7 years ago

Hi, just filled issue https://github.com/sphinx-doc/sphinx/issues/3923 on the Sphinx project.

carlos-jenkins commented 7 years ago

Hi,

Just released version 1.1.0 with the fix for this issue. Please upgrade with:

pip3 install --upgrade plantweb

Thanks

staylorx commented 7 years ago

Quick, that. I updated and ran again. No more error. :) Thank you.