# Calling Blender from Python, local machine vs Server; Unable to find pixel format

I have a python script that calls blender, my blender file, a python program performed in Blender, and 2 variables passed into the python script in blender.

The command looks like this.

subprocess.call(blender + ' ' + blenderFile + ' -P ' + ballSpinScript + ' -- ' + time + ' ' + efficiency)


I have confirmed that the variables all contain the correct paths. The discrepancy is occurring when I run on my local machine vs running on a server. On my machine it runs great. However, I have copied all the files over to a given server and it still runs but it takes much longer and outputs a warning that I am unsure of how to fix.

The warning is "Warning! Unable to find a pixel format that supports WGL_SWAP_COPY_ARB. Substituting one that uses WGL_SWAP_EXCHANGE_ARB.

I am not 100% sure if this is the issue (reason for the increased time to process), but it the only difference I am finding when the process is run.

• Do you need blender to be visualized on the server? If not you can use -b or --background (background) that may solve your issue – WhatAMesh Mar 6 at 3:48
• Yes because it will be an internal web tool. I have tried -b and --background and the issue with that is the following command cannot execute to create the mp4 if running in background..bpy.ops.render.opengl(animation=True) – Garrett Mar 6 at 19:33
• I don't want to rehash an old question I had, but my ultimate goal is to be able to input two values from my php script, that get passed into blender to render an mp4 file. I have the command worked out, but as mentioned above, blender doesn't seem to work with in the background if a render needs to occur. On my local machine it takes maybe 5 seconds, but on the server it takes closer to 30 seconds. – Garrett Mar 6 at 19:37