Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:21:32+00:00 2026-06-12T01:21:32+00:00

I am having problems calling pandoc from python using subprocess.Popen . It all works

  • 0

I am having problems calling pandoc from python using subprocess.Popen. It all works in the console. Here is the code.

# Test markdown file
here is just a simple markdown file.

Now my python code using that filename is the full path my markdown file:

import subprocess
fileout = os.path.splitext(filename)[0] + ".pdf"
args = ['pandoc', filename, '-o', fileout]
subprocess.Popen(args)

I also tried various ways to capture an error but that didn’t work. In the console, however, everything is running fine:

pandoc '[filename]' -o '[fileout]'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:21:33+00:00Added an answer on June 12, 2026 at 1:21 am

    That should work just fine, but you may want to wait for it to finish using subprocess.check_call rather than subprocess.Popen directly:

    subprocess.check_call(args)
    

    This also makes sure that it completed successfully. If the status code isn’t 0, it will throw an exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having problems calling a URL from PHP code. I need to call
I'm having problems resolving a repository when calling it from a console app. Everything
I'm having some problems calling a C function from a DLL, and was hoping
I'm having problems calling a class function from my Widget as the result of
I am currently having problems calling a stored procedure async from within a insert-update-trigger.
I'm having problems calling EJB3 stateless bean outside the container. Code for getting the
I'm having problems calling a method from a service. The error only occurs in
i'm having problems calling a delphi function from C# (attempted to read or write
i'm quite new in eclipse and having a problems with calling variables from other
I am having a problem calling a model property from my view. I may

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.