I am using quarto book in Rstudio. Rendering to pdf used to work but now that I have added an image it stopped working with the following error (Rendering to html still works perfectly):
Error running filter /opt/quarto/share/filters/quarto-init/quarto-init.lua:
/opt/quarto/share/filters/quarto-init/quarto-init.lua:246: attempt to index a nil value (global 'text')
stack traceback:
/opt/quarto/share/filters/quarto-init/quarto-init.lua:16: in local 'fn'
/opt/quarto/share/filters/quarto-init/quarto-init.lua:554: in function </opt/quarto/share/filters/quarto-init/quarto-init.lua:548>
Has someone encountered this before and knows what to do?
I have updated to the latest quarto (1.0.38) and Rstudio but the error still persists.
Solved.
The image path had an extra \ eg. \images\img1.png.
Once changed to images\img1.png. it worked fine
I am trying to embed a matplotlib plot in my qml window. Following the example given in this link There are 2 points:
When I try to use QtQml.qmlRegisterType from matplotlib_backend_qtquick and rest from PySide6, I get error as module 'Backend' not installed.
When I try to use QtQml.qmlRegisterType from PySide6, I get following error
qmlRegisterType(FigureCanvasQtQuickAgg, "Backend", 1, 0, "FigureCanvas")
TypeError: A type inherited from PySide6.QtCore.QObject expected, got FigureCanvasQtQuickAgg.
How do I resolve these errors?
[OSX] [node 8.4.0] [chromeless 1.3.0]
I am trying to implement a test using chromeless. I am running the sample in a local instance, with one change of specifying the imagePath to save the image. It is running and saving an image however the image is being saved in the default location still. Any ideas on what I am doing wrong? My desire is to save the image relative to the directory the test was executed in.
Modified line below.
.screenshot({ filePath: './images/test1.png'} );
As I said it all runs but the image is still saved in the following location
/var/folders/r1/4xfjz/T/cjavyrbo70000kk.png
Looks like a known problem. See https://github.com/graphcool/chromeless/issues/282
I'm trying to execute a graph located in a local graphs/ folder using the noflo.asCallback function.
I'm getting an error that the graph or component is not available with the base specified at the baseDir.
What is the correct way to us the asCallback function with a graph?
The issue was related to the package name of the project. The name I was using was noflo-test, and the graph was available as test/GraphName, without the noflo- prepended.
I am trying to test implementation of FPDF. Below is the code I'm testing with, but it keeps giving me the error: "Fatal error: Class 'FPDF' not found in /home4/fwall/public_html/create-press-release.php on line 5". That is the URL to the page I am calling the below code on.
I have verified that the php file for FPDF is being required from the right spot, and it's still happening. Can anyone figure out what's going on?
require(__DIR__.'/fpdf.php'); //The fpdf folder is in my root directory.
//create a FPDF object
$pdf=new FPDF();
//set document properties
$pdf->SetAuthor('Lana Kovacevic');
$pdf->SetTitle('FPDF tutorial');
//set font for the entire document
$pdf->SetFont('Helvetica','B',20);
$pdf->SetTextColor(50,60,100);
//set up a page
$pdf->AddPage('P');
$pdf->SetDisplayMode(real,'default');
//insert an image and make it a link
//$pdf->Image('logo.png',10,20,33,0,' ','http://www.fpdf.org/');
//display the title with a border around it
$pdf->SetXY(50,20);
$pdf->SetDrawColor(50,60,100);
$pdf->Cell(100,10,'FPDF Tutorial',1,0,'C',0);
//Set x and y position for the main text, reduce font size and write content
$pdf->SetXY (10,50);
$pdf->SetFontSize(10);
$pdf->Write(5,'Congratulations! You have generated a PDF.');
//Output the document
$pdf->Output('example1.pdf','I');
This line:
require('http://siteurlredacted.com/fpdf/fpdf.php');
probably won't do what you expect. The request will make the remote server "execute" fpdf.php, returning a blank page, and your script will include an empty file. That is why it doesn't find any class to load.
You should download FPDF and put the file on your filesystem, where it is accesible to your script with no HTTP requests. You can try putting fpdf.php inside your project.
Hope this helps.