You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! There are some problems in Doorstop v3.0b12 with refactored HTML publisher :
Publish error
$ doorstop publish all output -H
building tree...
loading documents...
publishing tree to '/home/username/doorstop/doorstop-rtm/output'...
Traceback (most recent call last):
File "/usr/bin/doorstop", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/doorstop/cli/main.py", line 177, in main
success = function(args, os.getcwd(), parser.error)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/doorstop/cli/commands.py", line 567, in run_publish
published_path = publisher.publish(
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/doorstop/core/publisher.py", line 85, in publish
common.write_lines(
File "/usr/lib/python3.11/site-packages/doorstop/common.py", line 189, in write_lines
for line in lines:
File "/usr/lib/python3.11/site-packages/doorstop/core/publisher.py", line 121, in publish_lines
yield from gen(obj, **kwargs)
File "/usr/lib/python3.11/site-packages/doorstop/core/publishers/html.py", line 293, in lines
doc_attributes = get_document_attributes(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/doorstop/core/publishers/base.py", line 323, in get_document_attributes
if "name" in attribute_defaults["doc"]:
~~~~~~~~~~~~~~~~~~^^^^^^^
KeyError: 'doc'
Bad formatting in doorstop-server - it seems there is no templates applied:
Can you supply the .doorstop.yml files for the document that fails? And also the printout with the --verbose flag set.
This looks correct to me as the new default. As I wrote in the release information, the whole html output was remade, including the templating. The reasons being: a) consolidating the html export with the doorstop-server so that they use the same templating, and b), a lot of the information in the template output was hard coded and not changeable by a template. I know the documentation is a bit bad on this part, but please try to do a default html export and all the template files will be included in the exported folder and give you at good starting point on how to create your own template in the new way.
...
loading document ADH-2122-UC's items...
loading document ADH-2122-REQ's items...
loading document ADH-2122-TST's items...
Deleting contents of template directory /home/username/doorstop/doorstop-rtm/output/template
Copying /usr/lib/python3.11/site-packages/doorstop/core/files/templates/html to /home/username/doorstop/doorstop-rtm/template
Copying /usr/lib/python3.11/site-packages/doorstop/core/../views to /home/username/doorstop/doorstop-rtm/output/template/views
Template = doorstop
publishing to /home/username/doorstop/doorstop-rtm/output/documents/ROOT.html...
publishing to /home/username/doorstop/doorstop-rtm/output/documents/OVERVIEW.html...
publishing to /home/username/doorstop/doorstop-rtm/output/documents/REQ.html...
Traceback (most recent call last):
File "/usr/bin/doorstop", line 8, in <module>
........ [error message here] ....
KeyError: 'doc'
If I removes attributes, the publish result of this doc is successful.
All docs at once I can't publish because of my RAM (according the error zsh: killed doorstop publish all output -H --verbose). I have specs with a lot of items.
Default template can't render markdown tables. How can I fix it? Maybe I apply the templates in incorrect way. My templates are located at the next path:
Deleting contents of template directory /home/username/doorstop/doorstop-rtm/output/template
Copying /usr/lib/python3.11/site-packages/doorstop/core/files/templates/html to /home/username/doorstop/doorstop-rtm/template
Copying /usr/lib/python3.11/site-packages/doorstop/core/../views to /home/username/doorstop/doorstop-rtm/output/template/views
Template = doorstop
I am facing the same issue, it really seems to be related to the available RAM. Is there any way of sequencing the publishing in order to limit the necessary available RAM ?
I realise that I've been cheating a bit on the checking of this information in the .doorstop.yml file. I will fix as soon as I can. In the meantime, please test to add the doc attribute with a "dummy" text. It should help. Like this:
attributes:
defaults:
component:
doc:
dummy
For the second problem with the template: The template folder should be placed alongside the documents. So for a document tree you would place the files like this:
Then you can publish like this: doorstop --html --template my_template all output
For the RAM issue: Can either of you contact my directly so that we can discuss if there is a way that you can share your document temporarily for testing as this is not something that I have encountered. It is on the 3.2 milestone to test very large setups, but I have not had the time yet.
@neerdoc I have used your fix from neerdoc@3c57c44
This fixes the situation for me, so please disregard my mail and my previous comments regarding a potential RAM issue, it works fine for me now !
I realise that I've been cheating a bit on the checking of this information in the .doorstop.yml file. I will fix as soon as I can. In the meantime, please test to add the doc attribute with a "dummy" text. It should help. Like this:
attributes:
defaults:
component:
doc:
dummy
2. For the second problem with the template: The template folder should be placed alongside the documents. So for a document tree you would place the files like this:
Then you can publish like this: doorstop --html --template my_template all output
For the RAM issue: Can either of you contact my directly so that we can discuss if there is a way that you can share your document temporarily for testing as this is not something that I have encountered. It is on the 3.2 milestone to test very large setups, but I have not had the time yet.
This dummy code is working, thank you:
doc:
dummy
Only the error with publishing tables is still actual. My publish template structure is the same as yours, but no tables are rendered in html output and in doorstop-server.
Activity
[-]HTML Publisher error[/-][+]HTML Publisher is not working[/+]neerdoc commentedon Feb 11, 2024
Hi @villanella,
.doorstop.ymlfiles for the document that fails? And also the printout with the--verboseflag set.villanella commentedon Feb 11, 2024
Hello @neerdoc, thank you for helping me with debug!
Verbose log:
If I removes attributes, the publish result of this doc is successful.
All docs at once I can't publish because of my RAM (according the error
zsh: killed doorstop publish all output -H --verbose). I have specs with a lot of items.fwuehr1995 commentedon Feb 12, 2024
I am facing the same issue, it really seems to be related to the available RAM. Is there any way of sequencing the publishing in order to limit the necessary available RAM ?
Fix doorstop-dev#628, part 1. Missed check of "doc" in attributes_def…
neerdoc commentedon Feb 12, 2024
.doorstop.ymlfile. I will fix as soon as I can. In the meantime, please test to add the doc attribute with a "dummy" text. It should help. Like this:Then you can publish like this:
doorstop --html --template my_template all outputFor the RAM issue: Can either of you contact my directly so that we can discuss if there is a way that you can share your document temporarily for testing as this is not something that I have encountered. It is on the 3.2 milestone to test very large setups, but I have not had the time yet.
fwuehr1995 commentedon Feb 13, 2024
Hi @neerdoc,
I tried to send you my files via mail, "[email protected]" is correct ?
fwuehr1995 commentedon Feb 13, 2024
@neerdoc I have used your fix from neerdoc@3c57c44
This fixes the situation for me, so please disregard my mail and my previous comments regarding a potential RAM issue, it works fine for me now !
neerdoc commentedon Feb 14, 2024
@fwuehr1995 Very good! I'll disregard the email.
villanella commentedon Feb 15, 2024
This dummy code is working, thank you:
Only the error with publishing tables is still actual. My publish template structure is the same as yours, but no tables are rendered in html output and in doorstop-server.
villanella commentedon Feb 15, 2024
@neerdoc This is an example how tables are rendered in doorstop-server and doorstop publish output
Screen 1:

Screen 2:

Fix doorstop-dev#628, part 1. Missed check of "doc" in attributes_def…