Skip to content

Instantly share code, notes, and snippets.

@danielepolencic
Created July 25, 2019 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielepolencic/04d506fde37f0e81b9e365fdd1908339 to your computer and use it in GitHub Desktop.
Save danielepolencic/04d506fde37f0e81b9e365fdd1908339 to your computer and use it in GitHub Desktop.
weasyprint TypeError: can only concatenate str (not "float") to str
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cap</title>
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css" />
<style>
@media print {
html {
-webkit-print-color-adjust: exact;
}
body {
counter-reset: chapternum;
}
@page {
size: 297mm 210mm;
margin-top: 20mm;
margin-bottom: 20mm;
margin-left: 10mm;
margin-right: 10mm;
@bottom-right {
content: counter(page);
font-family: -apple-system, BlinkMacSystemFont, 'avenir next', avenir, 'helvetica neue', helvetica, ubuntu, roboto, noto, 'segoe ui', arial, sans-serif;
font-weight: bold;
color: #AAAAAA;
}
@top-center {
content: string(chapter);
font-family: -apple-system, BlinkMacSystemFont, 'avenir next', avenir, 'helvetica neue', helvetica, ubuntu, roboto, noto, 'segoe ui', arial, sans-serif;
text-transform: uppercase;
letter-spacing: .1em;
color: #AAAAAA;
}
@bottom-left {
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 155.001 55.769"><path d="M40.977 25.802a2.08 2.08 0 0 0-2.077 2.077 2.08 2.08 0 0 0 2.077 2.077 2.08 2.08 0 0 0 2.078-2.077 2.08 2.08 0 0 0-2.078-2.077" fill="#326ce5"/><path d="M40.977 32.553a4.666 4.666 0 0 1-3.936-2.16c-.674 1.637-1.344 3.51-1.852 4.934-1.878 5.256-3.179 8.676-4.892 9.84a4.658 4.658 0 0 1-3.343 1.409 4.674 4.674 0 0 1-4.673-4.675c0-1.654.862-3.105 2.16-3.936-1.637-.674-3.51-1.344-4.934-1.852-5.257-1.878-8.677-3.179-9.839-4.892a4.674 4.674 0 0 1 3.264-8.016c1.655 0 3.106.862 3.937 2.16.674-1.637 1.343-3.51 1.852-4.934 1.878-5.257 3.179-8.677 4.892-9.839a4.674 4.674 0 0 1 8.016 3.264 4.666 4.666 0 0 1-2.16 3.937c1.637.674 3.51 1.344 4.934 1.852 5.256 1.878 8.676 3.179 9.84 4.892a4.658 4.658 0 0 1 1.409 3.342 4.674 4.674 0 0 1-4.675 4.674M29.885.83a2.83 2.83 0 0 0-4.001 0L.829 25.883a2.829 2.829 0 0 0 0 4.002L25.884 54.94a2.83 2.83 0 0 0 4.001 0L54.94 29.885a2.83 2.83 0 0 0 0-4.002z" fill="#326ce5"/><path d="M12.932 25.802a2.08 2.08 0 0 0-2.077 2.077 2.08 2.08 0 0 0 2.077 2.077 2.08 2.08 0 0 0 2.078-2.077 2.08 2.08 0 0 0-2.078-2.077M26.955 39.824a2.08 2.08 0 0 0-2.078 2.078 2.08 2.08 0 0 0 2.078 2.077 2.08 2.08 0 0 0 2.078-2.077 2.08 2.08 0 0 0-2.078-2.078M23.69 17.198a4.703 4.703 0 0 1-.67-.827c-.676 1.637-1.345 3.51-1.853 4.933-1.878 5.257-3.179 8.676-4.892 9.84a4.707 4.707 0 0 1-.828.671c1.636.675 3.51 1.344 4.933 1.853 5.257 1.877 8.677 3.178 9.84 4.892.254.248.478.526.67.827.676-1.637 1.345-3.51 1.853-4.934 1.878-5.256 3.179-8.676 4.892-9.839.25-.254.527-.479.828-.671-1.636-.674-3.51-1.344-4.933-1.852-5.257-1.878-8.677-3.18-9.84-4.893M26.955 15.934a2.08 2.08 0 0 0 2.078-2.078 2.08 2.08 0 0 0-2.078-2.077 2.08 2.08 0 0 0-2.078 2.077 2.08 2.08 0 0 0 2.078 2.078M68.684 32.877c-.14-.14-.24-.326-.302-.557a3.516 3.516 0 0 1-.093-.883V16.923l-2.16.372v14.49c0 1.146.28 1.99.837 2.532.557.542 1.501.828 2.833.859l.301-1.811a5.786 5.786 0 0 1-.859-.175 1.304 1.304 0 0 1-.557-.313M74.141 27.745c.047-.418.143-.828.29-1.23.148-.404.352-.76.616-1.07.263-.31.584-.56.963-.754.38-.193.817-.29 1.313-.29.882 0 1.574.313 2.078.94.503.627.747 1.429.732 2.404zm3.205-5.179a5.52 5.52 0 0 0-2.044.394 5.007 5.007 0 0 0-1.765 1.185c-.51.527-.92 1.189-1.23 1.986-.31.798-.465 1.73-.465 2.798 0 .913.12 1.753.36 2.52.24.766.607 1.428 1.103 1.985.496.558 1.126.995 1.893 1.312.766.318 1.675.477 2.729.477.835 0 1.582-.078 2.24-.233.658-.155 1.119-.302 1.382-.44l-.301-1.813c-.265.125-.655.252-1.173.383-.52.133-1.158.198-1.916.198-1.347 0-2.338-.325-2.973-.976-.635-.65-.998-1.602-1.092-2.856h8.268c.015-.124.023-.259.023-.406v-.36c0-2.074-.433-3.618-1.3-4.633-.868-1.014-2.114-1.52-3.74-1.52M91.93 33.225a5.817 5.817 0 0 1-.987.128 23.76 23.76 0 0 1-1.36.035c-.85 0-1.524-.15-2.02-.453-.495-.302-.743-.84-.743-1.614 0-.418.101-.755.303-1.01.2-.256.452-.456.754-.604.302-.147.635-.244.999-.29.363-.047.708-.07 1.033-.07a8.5 8.5 0 0 1 1.266.08c.348.056.6.122.754.198zm1.103-9.37c-.365-.41-.845-.728-1.44-.953-.597-.224-1.328-.336-2.195-.336-.759 0-1.463.058-2.113.174-.65.117-1.114.236-1.393.36l.255 1.788c.263-.108.662-.212 1.196-.313.534-.1 1.157-.15 1.87-.15.557 0 1.01.08 1.358.243.348.162.623.38.825.65.2.271.34.58.417.929.077.348.116.7.116 1.056v.604a8.83 8.83 0 0 0-.325-.07l-.545-.104c-.21-.039-.43-.07-.662-.093a6.632 6.632 0 0 0-.674-.034c-.681 0-1.331.069-1.95.208-.62.14-1.161.357-1.626.65a3.242 3.242 0 0 0-1.103 1.161c-.272.48-.407 1.053-.407 1.72 0 .696.117 1.292.35 1.788.231.495.557.894.974 1.195.418.303.914.523 1.486.662.573.14 1.2.21 1.882.21.48 0 .963-.02 1.451-.059.487-.038.94-.081 1.359-.128.417-.046.792-.096 1.126-.15.333-.055.592-.096.778-.128v-7.548c0-.68-.078-1.304-.232-1.869a3.606 3.606 0 0 0-.778-1.463M103.425 22.74a10.62 10.62 0 0 0-.71-.092 6.573 6.573 0 0 0-.638-.035c-.944 0-1.795.08-2.554.243-.76.163-1.394.337-1.905.523v11.564h2.16V24.795c.124-.03.384-.089.778-.173a5.689 5.689 0 0 1 1.196-.129c.619 0 1.127.044 1.521.129.395.084.677.158.848.22l.371-1.881a4.023 4.023 0 0 0-.43-.105 23.042 23.042 0 0 0-.637-.116M115.302 24.157c-.38-.488-.886-.868-1.52-1.138-.635-.27-1.432-.406-2.393-.406-1.067 0-2.013.069-2.833.208-.82.14-1.478.271-1.974.396v11.727h2.16V24.749c.078-.015.205-.039.383-.07.178-.03.379-.058.604-.08.224-.024.46-.044.709-.059.246-.016.488-.023.719-.023.573 0 1.053.073 1.44.22.387.148.696.383.93.708.231.325.397.752.498 1.277.1.527.151 1.162.151 1.905v6.317h2.16v-6.782c0-.82-.078-1.57-.232-2.252-.155-.681-.422-1.265-.802-1.753M129.015 31.385a36.4 36.4 0 0 0-1.44-1.803 16.082 16.082 0 0 0-1.44-1.5 67.61 67.61 0 0 0 2.567-2.654c.781-.857 1.582-1.757 2.403-2.7h-4.114c-.217.263-.476.57-.777.924-.302.354-.623.727-.963 1.12-.34.393-.693.789-1.056 1.188-.363.401-.715.786-1.055 1.155V16.923l-3.461.557v17.464h3.461v-5.355a9.51 9.51 0 0 1 1.17 1.142c.394.449.769.92 1.125 1.407.355.49.692.978 1.008 1.467.316.49.598.935.846 1.339h3.979a26.547 26.547 0 0 0-2.253-3.559M139.86 31.9c-.371.388-.96.582-1.765.582-.418 0-.774-.061-1.069-.186a2.236 2.236 0 0 1-.719-.466 1.758 1.758 0 0 1-.407-.616 1.772 1.772 0 0 1-.127-.618c0-.605.147-1.125.441-1.56a4.769 4.769 0 0 1 1.091-1.14c.434.139.84.29 1.22.454.379.163.708.349.987.558.278.21.498.455.661.734.163.279.244.597.244.954 0 .481-.186.916-.557 1.304m-3.622-9.476c.076-.2.197-.39.36-.567.161-.178.367-.321.615-.43.246-.107.541-.161.882-.161.355 0 .658.057.906.174.247.115.453.259.615.427.163.17.28.352.349.545.07.193.103.374.103.544 0 .587-.13 1.08-.394 1.482-.264.402-.642.757-1.137 1.065-.884-.308-1.507-.68-1.87-1.111-.364-.432-.545-.895-.545-1.39 0-.185.037-.377.116-.578m5.108 4.032a4.623 4.623 0 0 0 1.475-1.52 3.888 3.888 0 0 0 .592-2.074 4.38 4.38 0 0 0-.29-1.542 3.77 3.77 0 0 0-.941-1.403c-.433-.417-.987-.761-1.66-1.032-.674-.27-1.483-.406-2.427-.406-.805 0-1.537.128-2.195.383a5.298 5.298 0 0 0-1.683 1.02 4.481 4.481 0 0 0-1.463 3.282c0 .818.158 1.491.475 2.016.318.527.81 1.06 1.475 1.6-.31.234-.6.482-.87.745-.271.263-.515.554-.732.872a4.091 4.091 0 0 0-.511 1.058 4.192 4.192 0 0 0-.186 1.28c0 .45.093.941.28 1.476.185.534.498 1.027.94 1.476.441.45 1.021.827 1.741 1.128.72.302 1.621.454 2.706.454.944 0 1.776-.121 2.497-.36.719-.24 1.319-.578 1.799-1.012a4.19 4.19 0 0 0 1.08-1.523 4.99 4.99 0 0 0 .36-1.919c0-.837-.19-1.569-.57-2.197-.379-.628-1.009-1.229-1.892-1.802M154.827 30.264a2.734 2.734 0 0 0-.604-1.055c-.286-.316-.677-.611-1.173-.884a14.21 14.21 0 0 0-1.88-.831 10.73 10.73 0 0 1-.918-.387 3.791 3.791 0 0 1-.568-.326.788.788 0 0 1-.28-.314.944.944 0 0 1-.07-.371c0-.604.543-.906 1.626-.906.588 0 1.118.055 1.592.163.471.108.908.232 1.31.372l.605-2.695c-.403-.154-.945-.297-1.626-.43a11.265 11.265 0 0 0-2.136-.196c-1.486 0-2.655.333-3.507.999-.851.665-1.277 1.57-1.277 2.716 0 .589.085 1.091.256 1.51.17.418.41.777.719 1.08.31.301.686.56 1.127.777.441.217.932.427 1.474.627.697.263 1.215.5 1.556.708.341.21.511.453.511.732 0 .356-.131.597-.395.72-.264.124-.712.186-1.347.186a8.774 8.774 0 0 1-1.834-.198 11.298 11.298 0 0 1-1.811-.546l-.582 2.81c.28.125.78.279 1.499.465.72.186 1.621.279 2.705.279 1.657 0 2.938-.31 3.844-.927.905-.618 1.358-1.53 1.358-2.734 0-.51-.058-.958-.174-1.344" fill="#326ce5"/></svg>');
}
}
@page full {
margin: 0;
@bottom-left {
content: none
}
@bottom-right {
content: none
}
@top-center {
content: none
}
}
.on-new-page {
break-before: page;
}
.inseparable {
break-inside: avoid;
}
.widows-5 {
widows: 5;
}
.slideshow::before {
display: block;
height: 2em;
content: '';
}
.slideshow+* {
margin-top: 2em;
}
.toc a {
display: block;
width: 100%;
position: relative;
}
.toc a::after {
content: ' 'target-counter(attr(href), page);
position: absolute;
top: 50%;
right: 0;
transform: translateY(-50%);
}
.full-page {
page: full;
width: 297mm;
height: 210mm;
}
.half-page {
height: calc(105mm - 20mm);
}
h2 {
string-set: chapter ""content();
position: relative;
}
h2:before {
position: absolute;
top: -2em;
left: 4rem;
counter-increment: chapternum;
content: "Chapter "counter(chapternum);
font-size: 3rem;
font-weight: normal;
}
.chapter+p {
padding-top: 15rem;
}
.chapter+p:first-letter {
font-size: 4.5em;
float: left;
margin-top: 0.5rem;
font-family: georgia, times, serif;
line-height: 0.5;
padding: 0.8rem 1.2rem;
}
}
</style>
</head>
<body class="sans-serif">
<div class="content widows-5">
<div class="chapter"></div>
<p class="lh-copy measure f4 mv1 tj"><em class="i">All the diagrams you studied so far didn't picture any
server.</em>
All of them were focussed on the logical architecture of your application and not the physical infrastructure
which is necessary to deploy containers, Pods, Services and Ingresses.</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment