Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx-build -b html . _build/html/ fails with AttributeError: 'Sphinx' object has no attribute 'add_stylesheet' with sphinx 7.2.6 #630

Closed
chidanandpujar opened this issue Oct 12, 2023 · 2 comments

Comments

@chidanandpujar
Copy link
Collaborator

Issue Type

  • Bug Report

Module Name

Exception occurred:
File "/root/ansible_release_v103/ansible-junos-stdlib/ansible_collections/juniper/device/docs/conf.py", line 21, in setup
app.add_stylesheet("juniper-junos-modules.css")
AttributeError: 'Sphinx' object has no attribute 'add_stylesheet'
The full traceback has been saved in /tmp/sphinx-err-rgmwmn4s.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks!

juniper.device collection and Python libraries version


OS / Environment

Summary

Steps to reproduce

Expected results


Actual results


@chidanandpujar
Copy link
Collaborator Author

Logs :

~/ansible_release_v103/ansible-junos-stdlib/ansible_collections/juniper/device/docs# sphinx-build -b html . _build/html/
Running Sphinx v7.2.6
Processing  module ../plugins/modules/jsnapy.py
jsnapy.py:jsnapy:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'action': {'description': ['The JSNAPy action performed as specified by the I(action) option.'], 'returned': 'success', 'type': 'str'}, 'changed': {'description': ["Indicates if the device's state has changed. Since this module doesn't change the operational or configuration state of the device, the value is always set to C(false)."], 'returned': 'success', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'msg': {'description': ['A human-readable message indicating the result of the JSNAPy tests.'], 'returned': 'always', 'type': 'str'}}
Processing  module ../plugins/modules/system.py
system.py:system:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'action': {'description': ['The value of the I(action) option.'], 'returned': 'always', 'type': 'str'}, 'all_re': {'description': ['The value of the I(all_re) option.'], 'returned': 'always', 'type': 'str'}, 'changed': {'description': ["Indicates if the device's state has changed. If the action is performed (or if it would have been performed when in check mode) then the value will be C(true). If there was an error before the action, then the value will be C(false)."], 'returned': 'always', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'media': {'description': ['The value of the I(media) option.'], 'returned': 'always', 'type': 'str'}, 'msg': {'description': ['A human-readable message indicating the result.'], 'returned': 'always', 'type': 'str'}, 'other_re': {'description': ['The value of the I(other_re) option.'], 'returned': 'always', 'type': 'str'}}
Processing  module ../plugins/modules/software.py
software.py:software:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'changed': {'description': ["Indicates if the device's state has changed, or if the state would have changed when executing in check mode. This value is set to C(true) when the version of software currently running on the target Junos device does not match the desired version of software specified by the I(version) option. If the current and desired software versions match, the value of this key is set to C(false)."], 'returned': 'success', 'type': 'bool'}, 'check_mode': {'description': ['Indicates whether or not the module ran in check mode.'], 'returned': 'success', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'msg': {'description': ['A human-readable message indicating the result of the software installation.'], 'returned': 'always', 'type': 'str'}}
Processing  module ../plugins/modules/rpc.py
rpc.py:rpc:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'attrs': {'description': ['The RPC attributes and values from the list of dictionaries in the I(attrs) option. This will be none if no attributes are applied to the RPC.'], 'returned': 'always', 'type': 'dict'}, 'changed': {'description': ["Indicates if the device's state has changed. Since this module doesn't change the operational or configuration state of the device, the value is always set to C(false).", 'You could use this module to execute an RPC which changes the operational state of the the device. For example, C(clear-ospf-neighbor-information). Beware, this module is unable to detect this situation, and will still return a I(changed) value of C(false) in this case.'], 'returned': 'success', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed. See the I(results) key for additional details.'], 'returned': 'always', 'type': 'bool'}, 'format': {'description': ['The format of the RPC response from the list of formats in the I(formats) option.'], 'returned': 'always', 'type': 'str', 'choices': ['text', 'xml', 'json']}, 'kwargs': {'description': ['The keyword arguments from the list of dictionaries in the I(kwargs) option. This will be C(none) if no kwargs are applied to the RPC.'], 'returned': 'always', 'type': 'dict'}, 'msg': {'description': ['A human-readable message indicating the result.'], 'returned': 'always', 'type': 'str'}, 'parsed_output': {'description': ['The RPC reply from the Junos device parsed into a JSON datastructure. For XML replies, the response is parsed into JSON using the U(jxmlease|https://github.com/Juniper/jxmlease) library. For JSON the response is parsed using the Python U(json|https://docs.python.org/2/library/json.html) library.', 'When Ansible converts the jxmlease or native Python data structure into JSON, it does not guarantee that the order of dictionary/object keys are maintained.'], 'returned': 'when RPC executed successfully, I(return_output) is C(true), and the RPC format is C(xml) or C(json).', 'type': 'dict'}, 'results': {'description': ['The other keys are returned when a single RPC is specified for the I(rpcs) option. When the value of the I(rpcs) option is a list of RPCs, this key is returned instead. The value of this key is a list of dictionaries. Each element in the list corresponds to the RPCs in the I(rpcs) option. The keys for each element in the list include all of the other keys listed. The I(failed) key indicates if the individual RPC failed. In this case, there is also a top-level I(failed) key. The top-level I(failed) key will have a value of C(false) if ANY of the RPCs ran successfully. In this case, check the value of the I(failed) key for each element in the I(results) list for the results of individual RPCs.'], 'returned': 'when the I(rpcs) option is a list value.', 'type': 'list of dict'}, 'rpc': {'description': ['The RPC which was executed from the list of RPCs in the I(rpcs) option.'], 'returned': 'always', 'type': 'str'}, 'stdout': {'description': ['The RPC reply from the Junos device as a single multi-line string.'], 'returned': 'when RPC executed successfully and I(return_output) is C(true).', 'type': 'str'}, 'stdout_lines': {'description': ['The RPC reply from the Junos device as a list of single-line strings.'], 'returned': 'when RPC executed successfully and I(return_output) is C(true).', 'type': 'list of str'}}
Processing  module ../plugins/modules/command.py
command.py:command:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'changed': {'description': ["Indicates if the device's state has changed. Since this module does not change the operational or configuration state of the device, the value is always set to false.", 'You could use this module to execute a command which changes the operational state of the the device. For example, C(clear ospf neighbors). Beware, this module is unable to detect this situation, and will still return the value C(false) for I(changed) in this case.'], 'returned': 'success', 'type': 'bool', 'sample': False}, 'command': {'description': ['The CLI command which was executed.'], 'returned': 'always', 'type': 'str'}, 'failed': {'description': ['Indicates if the task failed. See the I(results) key for additional details.'], 'returned': 'always', 'type': 'bool'}, 'format': {'description': ['The format of the command response.'], 'returned': 'always', 'type': 'str'}, 'msg': {'description': ['A human-readable message indicating the result.'], 'returned': 'always', 'type': 'str'}, 'parsed_output': {'description': ['The command reply from the Junos device parsed into a JSON data structure. For XML replies, the response is parsed into JSON using the U(jxmlease|https://github.com/Juniper/jxmlease) library. For JSON the response is parsed using the Python U(json|https://docs.python.org/2/library/json.html) library.', 'When Ansible converts the jxmlease or native Python data structure into JSON, it does not guarantee that the order of dictionary/object keys are maintained.'], 'returned': 'when command executed successfully, I(return_output) is true, and the value of the I(formats) option is C(xml) or C(json).', 'type': 'dict'}, 'results': {'description': ['The other keys are returned when a single command is specified for the I(commands) option. When the value of the I(commands) option is a list of commands, this key is returned instead. The value of this key is a list of dictionaries. Each element in the list corresponds to the commands in the I(commands) option. The keys for each element in the list include all of the other keys listed. The I(failed) key indicates if the individual command failed. In this case, there is also a top-level I(failed) key. The top-level I(failed) key will have a value of C(false) if ANY of the commands ran successfully. In this case, check the value of the I(failed) key for each element in the I(results) list for the results of individual commands.'], 'returned': 'when the I(commands) option is a list value.', 'type': 'list of dict'}, 'stdout': {'description': ['The command reply from the Junos device as a single multi-line string.'], 'returned': 'when command executed successfully and I(return_output) is C(true).', 'type': 'str'}, 'stdout_lines': {'description': ['The command reply from the Junos device as a list of single-line strings.'], 'returned': 'when command executed successfully and I(return_output) is C(true).', 'type': 'list of str'}}
Processing  module ../plugins/modules/srx_cluster.py
srx_cluster.py:srx_cluster:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'changed': {'description': ["Indicates if the device's configuration has changed, or would have changed when in check mode."], 'returned': 'success', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'msg': {'description': ['A human-readable message indicating the result.'], 'returned': 'always', 'type': 'str'}, 'reboot': {'description': ['Indicates if a reboot of the device has been initiated.'], 'returned': 'success', 'type': 'bool'}}
Processing  module ../plugins/modules/pmtud.py
pmtud.py:pmtud:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'changed': {'description': ["Indicates if the device's state has changed. Since this module doesn't change the operational or configuration state of the device, the value is always set to C(false)."], 'returned': 'when PMTUD successfully executed.', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'host': {'description': ['The destination IP/host of the PMTUD as specified by the I(dest) option.', 'Keys I(dest) and I(dest_ip) are also returned for backwards compatibility.'], 'returned': 'when PMTUD successfully executed.', 'type': 'str'}, 'inet_mtu': {'description': ['The IPv4 path MTU size in bytes to the I(dest). This is the lesser of I(max_size) and the actual path MTU to I(dest). If the actual path MTU is less than I(min_test_size), then a failure is reported. Where I(min_test_size) = (I(max_size) - I(max_range) + 1)'], 'returned': 'when PMTUD successfully executed.', 'type': 'str'}, 'interface': {'description': ['The source interface of the PMTUD as specified by the I(interface) option.'], 'returned': 'when the I(interface) option was specified.', 'type': 'str'}, 'routing_instance': {'description': ['The routing-instance from which the PMTUD was performed as specified by the I(routing_instance) option.'], 'returned': 'when the I(routing_instance) option was specified.', 'type': 'str'}, 'source': {'description': ['The source IP/host of the PMTUD as specified by the I(source) option.', 'Key I(source_ip) is also returned for backwards compatibility.'], 'returned': 'when the I(source) option was specified.', 'type': 'str'}, 'warnings': {'description': ['A list of warning strings, if any, produced from the ping.'], 'returned': 'when warnings are present', 'type': 'list'}}
Processing  module ../plugins/modules/config.py
config.py:config:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'changed': {'description': ["Indicates if the device's configuration has changed, or would have changed when in check mode."], 'returned': 'success', 'type': 'bool'}, 'config': {'description': ['The retrieved configuration. The value is a single multi-line string in the format specified by the I(format) option.'], 'returned': 'when I(retrieved) is not C(none) and I(return_output) is C(true).', 'type': 'str'}, 'config_lines': {'description': ['The retrieved configuration. The value is a list of single-line strings in the format specified by the I(format) option.'], 'returned': 'when I(retrieved) is not C(none) and I(return_output) is C(true).', 'type': 'list'}, 'config_parsed': {'description': ['The retrieved configuration parsed into a JSON datastructure. For XML replies, the response is parsed into JSON using the jxmlease library. For JSON the response is parsed using the Python json library.', 'When Ansible converts the jxmlease or native Python data structure into JSON, it does not guarantee that the order of dictionary/object keys are maintained.'], 'returned': 'when I(retrieved) is not C(none), the I(format) option is C(xml) or C(json) and I(return_output) is C(true).', 'type': 'dict'}, 'diff': {'description': ['The configuration differences between the previous and new configurations. The value is a dict that contains a single key named "prepared". Value associated with that key is a single multi-line string in "diff" format.'], 'returned': 'when I(load)  or I(rollback) is specified, I(diff) is C(true), and I(return_output) is C(true).', 'type': 'dict'}, 'diff_lines': {'description': ['The configuration differences between the previous and new configurations. The value is a list of single-line strings in "diff" format.'], 'returned': 'when I(load)  or I(rollback) is specified, I(diff) is C(true), and I(return_output) is C(true).', 'type': 'list'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'file': {'description': ['The value of the I(src) option.'], 'returned': 'when I(load) is not C(none) and I(src) is not C(none)', 'type': 'str'}, 'msg': {'description': ['A human-readable message indicating the result.'], 'returned': 'always', 'type': 'str'}}
Processing  module ../plugins/modules/facts.py
facts.py:facts:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'ansible_facts.junos': {'description': ["Facts collected from the Junos device. This dictionary contains the keys listed in the I(contains) section of this documentation PLUS all of the keys returned from PyEZ's fact gathering system. See U(PyEZ facts|http://junos-pyez.readthedocs.io/en/stable/jnpr.junos.facts.html) for a complete list of these keys and their meaning."], 'returned': 'success', 'type': 'complex', 'contains': {'config': {'description': ["The device's committed configuration, in the format specified by I(config_format), as a single multi-line string."], 'returned': 'when I(config_format) is not C(none).', 'type': 'str'}, 'has_2RE': {'description': ["Indicates if the device has more than one Routing Engine installed. Because Ansible does not allow keys to begin with a number, this fact is returned in place of PyEZ's C(2RE) fact."], 'returned': 'success', 'type': 'bool'}, 're_name': {'description': ['The name of the current Routing Engine to which Ansible is connected.'], 'returned': 'success', 'type': 'str'}, 'master_state': {'description': ['The mastership state of the Routing Engine to which Ansible is connected. C(true) if the RE is the master Routing Engine. C(false) if the RE is not the master Routing Engine.'], 'returned': 'success', 'type': 'bool'}}}, 'changed': {'description': ["Indicates if the device's state has changed. Since this module does not change the operational or configuration state of the device, the value is always set to C(false)."], 'returned': 'success', 'type': 'bool', 'sample': False}, 'facts': {'description': ['Returned for backwards compatibility. Returns the same keys and values which are returned under I(ansible_facts.junos).'], 'returned': 'success', 'type': 'dict'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool', 'sample': False}}
Processing  module ../plugins/modules/ping.py
ping.py:ping:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'acceptable_percent_loss': {'description': ['The acceptable packet loss (as a percentage) for this task as specified by the I(acceptable_percent_loss) option.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'changed': {'description': ["Indicates if the device's state has changed. Since this module doesn't change the operational or configuration state of the device, the value is always set to C(false)."], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'bool'}, 'count': {'description': ['The number of pings sent, as specified by the I(count) option.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'do_not_fragment': {'description': ['Whether or not the do not fragment bit was set on the pings sent, as specified by the I(do_not_fragment) option.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'host': {'description': ['The destination IP/host of the pings sent as specified by the I(dest) option.', 'Keys I(dest) and I(dest_ip) are also returned for backwards compatibility.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'interface': {'description': ['The source interface of the pings sent as specified by the I(interface) option.'], 'returned': 'when ping successfully executed and the I(interface) option was specified, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'msg': {'description': ['A human-readable message indicating the result.'], 'returned': 'always', 'type': 'str'}, 'packet_loss': {'description': ['The percentage of packets lost.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'packets_sent': {'description': ['The number of packets sent.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'packets_received': {'description': ['The number of packets received.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'rapid': {'description': ['Whether or not the pings were sent rapidly, as specified by the I(rapid) option.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'bool'}, 'routing_instance': {'description': ['The routing-instance from which the pings were sent as specified by the I(routing_instance) option.'], 'returned': 'when ping successfully executed and the I(routing_instance) option was specified, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'rtt_average': {'description': ['The average round-trip-time, in microseconds, of all ping responses received.'], 'returned': 'when ping successfully executed, and I(packet_loss) < 100%.', 'type': 'str'}, 'rtt_maximum': {'description': ['The maximum round-trip-time, in microseconds, of all ping responses received.'], 'returned': 'when ping successfully executed, and I(packet_loss) < 100%.', 'type': 'str'}, 'rtt_minimum': {'description': ['The minimum round-trip-time, in microseconds, of all ping responses received.'], 'returned': 'when ping successfully executed, and I(packet_loss) < 100%.', 'type': 'str'}, 'rtt_stddev': {'description': ['The standard deviation of round-trip-time, in microseconds, of all ping responses received.'], 'returned': 'when ping successfully executed, and I(packet_loss) < 100%.', 'type': 'str'}, 'size': {'description': ['The size in bytes of the ICMP payload on the pings sent as specified by the I(size) option.', 'Total size of the IP packet is I(size) + the 20 byte IP header + the 8 byte ICMP header. Therefore, I(size) of 1472 generates an IP packet of size 1500.'], 'returned': 'when ping successfully executed and the I(size) option was specified, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'source': {'description': ['The source IP/host of the pings sent as specified by the I(source) option.', 'Key I(source_ip) is also returned for backwards compatibility.'], 'returned': 'when ping successfully executed and the I(source) option was specified, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'timeout': {'description': ['The number of seconds to wait for a response from the ping RPC.'], 'returned': 'when ping successfully executed, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'ttl': {'description': ['The time-to-live set on the pings sent as specified by the I(ttl) option.'], 'returned': 'when ping successfully executed and the I(ttl) option was specified, even if the I(acceptable_percent_loss) was exceeded.', 'type': 'str'}, 'warnings': {'description': ['A list of warning strings, if any, produced from the ping.'], 'returned': 'when warnings are present', 'type': 'list'}}
Processing  module ../plugins/modules/table.py
table.py:table:yaml error:'AnsibleMapping' object has no attribute 'read':returndocs={'changed': {'description': ["Indicates if the device's configuration has changed. Since this module does not change the operational or configuration state of the device, the value is always set to C(false)."], 'returned': 'success', 'type': 'bool'}, 'failed': {'description': ['Indicates if the task failed.'], 'returned': 'always', 'type': 'bool'}, 'msg': {'description': ['A human-readable message indicating a summary of the result.'], 'returned': 'always', 'type': 'str'}, 'resource': {'description': ['The items retrieved by the table/view.'], 'returned': 'success', 'type': 'list of dicts if I(response_type) is C(list_of_dicts) or list of lists if I(respsonse_type) is C(juniper_items).', 'sample': '# when response_type == \'list_of_dicts\'\n[\n  {\n     "local_int": "ge-0/0/3", \n     "local_parent": "-", \n     "remote_chassis_id": "00:05:86:08:d4:c0", \n     "remote_port_desc": null, \n     "remote_port_id": "ge-0/0/0", \n     "remote_sysname": "r5", \n     "remote_type": "Mac address"\n  }, \n  {\n     "local_int": "ge-0/0/0", \n     "local_parent": "-", \n     "remote_chassis_id": "00:05:86:18:f3:c0", \n     "remote_port_desc": null, \n     "remote_port_id": "ge-0/0/2", \n     "remote_sysname": "r4", \n     "remote_type": "Mac address"\n  }\n]\n# when response_type == \'juniper_items\'\n[\n  [\n    "ge-0/0/3", \n    [\n      [\n        "local_parent", \n        "-"\n      ], \n      [\n        "remote_port_id", \n        "ge-0/0/0"\n      ], \n      [\n        "remote_chassis_id", \n        "00:05:86:08:d4:c0"\n      ], \n      [\n        "remote_port_desc", \n        null\n      ], \n      [\n        "remote_type", \n        "Mac address"\n      ], \n      [\n        "local_int", \n        "ge-0/0/3"\n      ], \n      [\n        "remote_sysname", \n        "r5"\n      ]\n    ]\n  ], \n  [\n    "ge-0/0/0", \n    [\n      [\n        "local_parent", \n        "-"\n      ], \n      [\n        "remote_port_id", \n        "ge-0/0/2"\n      ], \n      [\n        "remote_chassis_id", \n        "00:05:86:18:f3:c0"\n      ], \n      [\n        "remote_port_desc", \n        null\n      ], \n      [\n        "remote_type", \n        "Mac address"\n      ], \n      [\n        "local_int", \n        "ge-0/0/0"\n      ], \n      [\n        "remote_sysname", \n        "r4"\n      ]\n    ]\n  ]\n]\n'}}
loading pickled environment... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... copying static files... done
copying extra files... done
done
writing output... [100%] index
generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build/html.

chidanandpujar added a commit that referenced this issue Oct 17, 2023
@chidanandpujar
Copy link
Collaborator Author

Fix is merged via #631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant