Re: [sphinx-users] Digest for sphinx-users@googlegroups.com - 1 update in 1 topic

6 views
Skip to first unread message

Chhavi Khurana

unread,
Feb 18, 2023, 6:26:11 AM2/18/23
to sphinx...@googlegroups.com, sphinx-users...@googlegroups.com
Unsubscribe

On Sat, Feb 18, 2023 at 5:59 AM <sphinx...@googlegroups.com> wrote:
Christian Rost <cro...@gmail.com>: Feb 17 03:46AM -0800

Hi,
I want to write my documentation with Sphinx and in my file I am using
ConfigParser to set different variables out of a config file.
When referencing a function in my Python file from Sphinx it is always
throwing an error.
 
This is the extract from the code as an example:
 
 
*config_ini =
configparser.ConfigParser()config_ini.read(os.path.abspath("config.ini"))*
*VIP_SW = config_ini['VIP']['SW']*
 
And I get the following error:
 
WARNING: autodoc: failed to import function 'get_HW_version' from module
'QNX_Testclient_TCP'; the following exception was raised:
Traceback (most recent call last):
File "C:\Users\crost\OneDrive -
Visteon\01_Projects\09_Scania\01_DDU_CDC_2023\24_SW\99_Flash\10_Testing\lib\site-packages\sphinx\ext\autodoc\importer.py",
line 60, in import_module
return importlib.import_module(modname)
File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in
_call_with_frames_removed
File "C:\Users\crost\OneDrive -
Visteon\01_Projects\09_Scania\01_DDU_CDC_2023\24_SW\99_Flash\10_Testing\QNX_Testclient_TCP.py",
line 20, in <module>
VIP_SW = config_ini['VIP']['SW']
File "C:\Program Files\Python39\lib\configparser.py", line 963, in
__getitem__
raise KeyError(key)
KeyError: 'VIP'
 
 
Has anybody an idea on how to solve it?
 
Thx.
 
Chris
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to sphinx-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages