Giter VIP home page Giter VIP logo

doxyphp2sphinx's People

Contributors

mike42 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

silverfoxy

doxyphp2sphinx's Issues

KeyError traceback

Trying out generating PHP docs per https://mike42.me/blog/2018-06-how-to-create-effective-php-project-documentation-with-read-the-docs, and doxyphp2sphinx crashed on me:

docs$ doxyphp2sphinx Soong
Processing namespace Soong
  refid is namespace_soong
  Opening xml/namespace_soong.xml
  Page title will be 'API documentation'
  Page path will be  './api.rst'
  Desc is ... '
'
...
Processing class Soong::Console::Command::EtlCommand
  refid is class_soong_1_1_console_1_1_command_1_1_etl_command
  Class title will be 'EtlCommand'
  Class path will be  './api/console/command/etlcommand.rst'
Traceback (most recent call last):
  File "/usr/local/bin/doxyphp2sphinx", line 11, in <module>
    sys.exit(Cli.run())
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/cli.py", line 28, in run
    generator.render_namespace_by_name(tree, root_namespace)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 29, in render_namespace_by_name
    self.render_namespace_by_ref_id(child.attrib['refid'], this_namespace_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 79, in render_namespace_by_ref_id
    self.render_namespace_by_ref_id(ns_id, ns_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 79, in render_namespace_by_ref_id
    self.render_namespace_by_ref_id(ns_id, ns_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 74, in render_namespace_by_ref_id
    self.render_class_by_ref_id(cl_id, cl_name)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 343, in render_class_by_ref_id
    class_rst = self.class_xml_to_rst(compounddef, title)
  File "/Library/Python/2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 124, in class_xml_to_rst
    baserefid = base_class.attrib['refid']
KeyError: 'refid'

It would seem to be choking either finishing the EtlCommand class or starting the MigrateCommand class in https://gitlab.com/soongetl/soong/tree/master/src/Console/Command.

Any thoughts?

KeyError: 'refid'

Hi I wanted to view my PHP documentation in Sphinx and I followed your article https://mike42.me/blog/2018-06-how-to-create-effective-php-project-documentation-with-read-the-docs .
Until now everything went smooth, but I came across this error, do you know what is going on?

$ /usr/local/bin/doxyphp2sphinx -v OCA::vdpptasks
Processing namespace OCA::vdpptasks
refid is namespace_o_c_a_1_1vdpptasks
Opening xml/namespace_o_c_a_1_1vdpptasks.xml
Page title will be 'API documentation'
Page path will be './api.rst'
Desc is ... '
'
Processing namespace OCA::vdpptasks::Controller
refid is namespace_o_c_a_1_1vdpptasks_1_1_controller
Opening xml/namespace_o_c_a_1_1vdpptasks_1_1_controller.xml
Page title will be 'Controller namespace'
Page path will be './api/_controller.rst'
Desc is ... '
'
Processing class OCA::vdpptasks::Controller::DocuController
refid is class_o_c_a_1_1vdpptasks_1_1_controller_1_1_docu_controller
Class title will be 'DocuController'
Class path will be './api/controller/docucontroller.rst'
Traceback (most recent call last):
File "/usr/local/bin/doxyphp2sphinx", line 8, in
sys.exit(Cli.run())
File "/usr/local/lib/python3.8/site-packages/doxyphp2sphinx/cli.py", line 28, in run
generator.render_namespace_by_name(tree, root_namespace)
File "/usr/local/lib/python3.8/site-packages/doxyphp2sphinx/rstgenerator.py", line 29, in render_namespace_by_name
self.render_namespace_by_ref_id(child.attrib['refid'], this_namespace_name)
File "/usr/local/lib/python3.8/site-packages/doxyphp2sphinx/rstgenerator.py", line 79, in render_namespace_by_ref_id
self.render_namespace_by_ref_id(ns_id, ns_name)
File "/usr/local/lib/python3.8/site-packages/doxyphp2sphinx/rstgenerator.py", line 74, in render_namespace_by_ref_id
self.render_class_by_ref_id(cl_id, cl_name)
File "/usr/local/lib/python3.8/site-packages/doxyphp2sphinx/rstgenerator.py", line 343, in render_class_by_ref_id
class_rst = self.class_xml_to_rst(compounddef, title)
File "/usr/local/lib/python3.8/site-packages/doxyphp2sphinx/rstgenerator.py", line 124, in class_xml_to_rst
baserefid = base_class.attrib['refid']
KeyError: 'refid'

AttributeError: 'NoneType' object has no attribute 'text'

When calling doxyphp2sphinx I got this stack trace on a class:

Processing class Brotkrueml::*********Client::Client::RestClient
 refid is classBrotkrueml_1_1*********Client_1_1Client_1_1RestClient
 Class title will be 'RestClient'
 Class path will be  './api/client/restclient.rst'
 methods:
   __construct (ClientConfiguration $configuration)
Traceback (most recent call last):
 File "/home/chris/.local/bin/doxyphp2sphinx", line 11, in <module>
   sys.exit(Cli.run())
 File "/home/chris/.local/lib/python2.7/site-packages/doxyphp2sphinx/cli.py", line 28, in run
   generator.render_namespace_by_name(tree, root_namespace)
 File "/home/chris/.local/lib/python2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 29, in render_namespace_by_name
   self.render_namespace_by_ref_id(child.attrib['refid'], this_namespace_name)
 File "/home/chris/.local/lib/python2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 79, in render_namespace_by_ref_id
   self.render_namespace_by_ref_id(ns_id, ns_name)
 File "/home/chris/.local/lib/python2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 74, in     render_namespace_by_ref_id
   self.render_class_by_ref_id(cl_id, cl_name)
 File "/home/chris/.local/lib/python2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 343, in render_class_by_ref_id
   class_rst = self.class_xml_to_rst(compounddef, title)
 File "/home/chris/.local/lib/python2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 158, in class_xml_to_rst
   rst += self.method_xml_to_rst(method, 'method')
 File "/home/chris/.local/lib/python2.7/site-packages/doxyphp2sphinx/rstgenerator.py", line 178, in method_xml_to_rst
   argname_type = argname.find('parametertype').text
AttributeError: 'NoneType' object has no attribute 'text'

class: github.com/brotkrueml/jobrouter-client/blob/master/src/Client/RestClient.php

XML: pastebin.com/AGY6J7pF

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.