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

Exception in Topic build_flowable() #173

Closed
maltfield opened this issue Jul 23, 2020 · 1 comment
Closed

Exception in Topic build_flowable() #173

maltfield opened this issue Jul 23, 2020 · 1 comment
Labels
bug crash
Milestone

Comments

@maltfield
Copy link

@maltfield maltfield commented Jul 23, 2020

I encountered a "Value Error" critical exception when building a pdf using sphinx and rinoh today. The issue appears to be caused by two items in a list, which causes an issue in this line:

My best-guess is that this is an issue when the source reST file has a target definition followed by a directive without first being followed by a section header. I encountered this issue when writing a the following article, which provides further context in the section towards the end titled "Exception occurred...ValueError: too many values to unpack (expected 1)"

System Info

user@disp9374:~$ cat /etc/issue
Debian GNU/Linux 10 \n \l

user@disp9374:~$ uname -a
Linux disp9374 4.19.125-1.pvops.qubes.x86_64 #1 SMP Sat May 30 16:11:30 UTC 2020 x86_64 GNU/Linux
user@disp9374:~$ python3 -m pip list | grep rinoh
rinoh-typeface-dejavuserif    0.1.1        
rinoh-typeface-texgyrecursor  0.1.1        
rinoh-typeface-texgyreheros   0.1.1        
rinoh-typeface-texgyrepagella 0.1.1        
rinohtype                     0.4.1        
user@disp9374:~$ dpkg -l | grep sphinx
ii  libjs-sphinxdoc                       1.8.4-1                             all          JavaScript support for Sphinx documentation
ii  python3-sphinx                        1.8.4-1                             all          documentation generator for Python projects (implemented in Python 3)
ii  python3-sphinx-rtd-theme              0.4.3+dfsg-1                        all          sphinx theme from readthedocs.org (Python 3)
ii  sphinx-common                         1.8.4-1                             all          documentation generator for Python projects - common data
ii  sphinx-intl                           0.9.11-2                            amd64        translation support utility for Sphinx
ii  sphinx-rtd-theme-common               0.4.3+dfsg-1                        all          sphinx theme from readthedocs.org (common files)
user@disp9374:~$ 

Steps to reproduce

git clone https://github.com/maltfield/rtd-github-pages.git
cd rtd-github-pages
git reset --hard 5b888c4315c6dfc39d9c131b0c23ec0e0ef1de4a
sphinx-build -b rinoh docs/ docs/_build/rinoh -D language=en

Example execution

user@disp9374:~$ git clone https://github.com/maltfield/rtd-github-pages.git
Cloning into 'rtd-github-pages'...
remote: Enumerating objects: 71, done.
remote: Counting objects: 100% (71/71), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 216 (delta 43), reused 68 (delta 43), pack-reused 145
Receiving objects: 100% (216/216), 4.83 MiB | 63.00 KiB/s, done.
Resolving deltas: 100% (84/84), done.
user@disp9374:~$ cd rtd-github-pages
user@disp9374:~/rtd-github-pages$ git reset --hard 5b888c4315c6dfc39d9c131b0c23ec0e0ef1de4a
HEAD is now at 5b888c4 actually adding the dir for english expected from the previous commit..
user@disp9374:~/rtd-github-pages$ sphinx-build -b rinoh docs/ docs/_build/rinoh -D language=en
Running Sphinx v1.8.4
loading translations [en]... done
making output directory...
'rinoh_documents' config variable not set, automatically converting from 'latex_documents'
'rinoh_elements/papersize' config variable not set, automatically converting from 'latex_elements/papersize'
'rinoh_elements/papersize' config variable not set, automatically converting from 'latex_elements/papersize'
'rinoh_logo' config variable not set, automatically converting from 'latex_logo'
'rinoh_logo' config variable not set, automatically converting from 'latex_logo'
'rinoh_domain_indices' config variable not set, automatically converting from 'latex_domain_indices'
'rinoh_domain_indices' config variable not set, automatically converting from 'latex_domain_indices'
building [mo]: targets for 2 po files that are out of date
writing output... [100%] locales/en/LC_MESSAGES/autodoc.mo                      
building [rinoh]: all documents
updating environment: 2 added, 0 changed, 0 removed
Hello Worldrces... [ 50%] autodoc                                               
reading sources... [100%] index                                                 
looking for now-outdated files... none found
pickling environment... 'rinoh_elements/papersize' config variable not set, automatically converting from 'latex_elements/papersize'
'rinoh_logo' config variable not set, automatically converting from 'latex_logo'
'rinoh_domain_indices' config variable not set, automatically converting from 'latex_domain_indices'
done
checking consistency... done
processing target... index autodoc resolving references...
rendering... 

Exception occurred:
  File "/home/user/.local/lib/python3.7/site-packages/rinoh/frontend/rst/nodes.py", line 183, in build_flowable
    toc_id, = self.get('ids')
ValueError: too many values to unpack (expected 1)
The full traceback has been saved in /tmp/sphinx-err-w14bob_f.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!
user@disp9374:~/rtd-github-pages$ 
@maltfield maltfield added bug crash labels Jul 23, 2020
brechtm added a commit that referenced this issue Jul 24, 2020
brechtm added a commit that referenced this issue Jul 24, 2020
@brechtm brechtm added this to the 0.4.2 milestone Jul 24, 2020
@brechtm
Copy link
Owner

@brechtm brechtm commented Jul 24, 2020

Thanks for the detailed bug report! The fix will be included with 0.4.2.

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

No branches or pull requests

2 participants