Trouble running code on Windows Server 2012

Hi, I'm having trouble running a code I wrote that uses lxml in python on a Windows 2012 Server. I originally wrote the script on MacOSx and it works well. I tried to run the same on the server. The code runs without error and it produces PDFs, however when I try to open them up they are corrupted or show up as blank. I followed some steps (i.e. following the instructions in the documentation to install the dependencies of lxml and by reseting the PATH env to make sure the dependencies were routing to the proper place) to no avail. I'll attach the script. I'm doing research in the economics department at UBC in Vancouver, Canada. My coding skills are coming along but they're far from perfect. Any help you could provide would be great. Thanks, Ken

Hi Ken, you should open the pdf file in binary mode: with open(outfile, 'wb') as out: Otherwise bad things happen with the PDF content (CR/LF conversions...). 2014-12-16 8:39 GMT+01:00 Ken Norris <kenorris92@gmail.com>:
Hi,
I'm having trouble running a code I wrote that uses lxml in python on a Windows 2012 Server. I originally wrote the script on MacOSx and it works well. I tried to run the same on the server. The code runs without error and it produces PDFs, however when I try to open them up they are corrupted or show up as blank. I followed some steps (i.e. following the instructions in the documentation to install the dependencies of lxml and by reseting the PATH env to make sure the dependencies were routing to the proper place) to no avail. I'll attach the script.
I'm doing research in the economics department at UBC in Vancouver, Canada. My coding skills are coming along but they're far from perfect. Any help you could provide would be great.
Thanks,
Ken
_________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de https://mailman-mail5.webfaction.com/listinfo/lxml
-- Amaury Forgeot d'Arc
participants (2)
-
Amaury Forgeot d'Arc
-
Ken Norris