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

File does not exist - fixed but don't know why #15

Open
phoebebright opened this issue Feb 1, 2016 · 3 comments
Open

File does not exist - fixed but don't know why #15

phoebebright opened this issue Feb 1, 2016 · 3 comments

Comments

@phoebebright
Copy link

Been struggling all day to the pdf printing, mostly my own confusion about what it was doing so it keep calling the render_to_pdf endlessly. Having sorted that I got file does not exist /tmp/phantom_pdf/pdfs/output.pdf (where output is the basename). However the directory structure was there so why no file. In desperation I deleted /tmp/phantom_pdf and suddenly it started working. The permissions appear the same, I'm running on Mac and owner is my id and group is wheel.

Leaving this note here in case someone else has the same problem rather than a need for it to be identified and fixed as probably something to do with my setup.

@Kebie
Copy link

Kebie commented Mar 8, 2016

I am getting this same error. When I first looked it only had a /cookies directory, so I tried to create a PDF one but it did nothing. So I deleted the whole /tmp/phantom_pdf directory like you suggested, but it still doesn't work. It does recreate the directory with the pdf director this time however. I set all permissions to 777, still nothing.. I have tried creating a tmp directory in my www/public directory and setting it to create there explicitly with PHANTOMJS_PDF_DIR , and it still says it can't find it.

@Hedde
Copy link

Hedde commented May 24, 2016

We had a similar issue where a pdf could only be touched with a valid session, because the build_url returns a http path, an external call is made without a valid session (possibly going through load balancers and what not). We fixed this with a patch (proposed in a pull request) that allows you to manipulate the domain via django settings (e.g. 'localhost:8000').

@tzenderman
Copy link
Contributor

Hey @Hedde @Kebie @phoebebright Sorry for the delay. We've actually moved on to using wkhtmltopdf which I recommend over using phantom for generating PDFs. Because of that, this repo and package has gone unmaintained by us. If you'd like, I can give you push priveleges to the repo so that you can keep it updated if you are interested? Otherwise, I would suggest working off your forks, or using a different package as we won't be maintaining this package any longer. Sorry and thanks for understanding.

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

No branches or pull requests

4 participants