15
Jul
10

update to 8.4.22: disabled stdout prints for exception prevention

Python doesn’t like to execute prints if started as a windowed version (double clicked file with pyw extension). The strange thing is that it doesn’t throw immediately an exception but waits until its 4096 bytes buffer is filled up. That means the IOError exception can happen in several places and masks the real problem.

I suspected  if a python script is started in windows mode and it print something it’s just going to /dev/null but Python seems to be very resolute about confusing the programmers.

Advertisements

13 Responses to “update to 8.4.22: disabled stdout prints for exception prevention”


  1. 1 wilson
    July 28, 2010 at 8:22 pm

    Dear tetrachroma:
    First of all many thafor your great work. I got some problem in using your script.
    My PC is 32bit with Window XP Sp2, and I download and run all the program given in your download link according to your remark. That is to say python-2.7+pycrypto-2.1.0.win32-py2.7+pywin32-214.win32-py2.7+ineptpdf8.4.22. But when I dobleclick the ineptpdf8.4.22.pyw to decrypt my FileOpen pdf document. The error shows ” Error:u’\u684c’ “. My FileOpen pdf document is downloaded from http://fileopen.bl.uk:8008/FileOpenFreeLink-1.0/entryPage.do . I tried the script for another FileOpen pdf document and got the similar error ” Error:u’\u345c’ “. All the FileOpen pdf document can be opened in my Adobe Acrobat Professional 7.0. I thought there
    might be something wrong with my PC,so I did another test on my IBM Thinkpad laptop. Unfortunely I got the same error above. I use my PC and laptop in my company’s LAN(Local Aera Network). Could you please help me solve this problem? Best regards! wish you a happy vacation!

    • July 28, 2010 at 8:30 pm

      You might send me one of the non working pdfs. I will search for the problem after I`ll get back.

      In the meantime I’m enjoying the water and getting sun tanned. 😉

      • 3 wilson
        July 28, 2010 at 8:45 pm

        thanks for your so quick reply. There’s someting wrong with my PC’s LCD screen ,so I can’t get my document on hand right now. I use my laptop now but there is no FileOpen pdf in it. I tried the script on my laptop to decrypt the FileOpen pdf downloaded from

        http://fileopen.bl.uk:8008/FileOpenFreeLink-1.0/entryPage.do

        but got the same error above 😦

        • July 31, 2010 at 6:51 am

          The

          http://fileopen.bl.uk:8008/FileOpenFreeLink-1.0/entryPage.do

          works for me. Try 8.4.24 and report back.

          • 5 wilson
            August 1, 2010 at 10:50 pm

            dear tetrachroma:
            when I run the newest script “ineptpdf8.4.26.pyw”,I still got the same error as before that shows ” Error:u’\u684c’ ” 😦

          • August 2, 2010 at 6:17 am

            hey wilson

            seems to be an unicode problem. can you copy/paste the path to your pdf, the pdf name (right click, renmame, copy-paste the name) and send it to me.

  2. 7 wilson
    August 2, 2010 at 6:57 pm

    Dear tetrachroma:
    Thanks a lot for your taking pains to try to solve my problem. Thanks for your reply, it mentioned the “unicode problem”. I checked my file’s path immediately in which a non-English character contained because I’m from a English-speaking country. So I changed the path to all in English. Thanks to God, the problem appearing previously that read ” Error:u’\u684c ” no longer arise.

    But another problem came out. The file I downloaded from ” http://fileopen.bl.uk:8008/FileOpenFreeLink-1.0/entryPage.do ” can not be decrypted. This time the Error read ” Error:Decryption was not successful. Reason: Document Access Denied.Please contact British Library Customer Service if you believe this to be an error.”

    I downloaded the file from ” http://fileopen.bl.uk:8008/FileOpenFreeLink-1.0/entryPage.do
    again and again and tried your script several times. But to my saddness, the same probem that “Error:Decryption was not successful.” were always there.

    But I didn’t give up. Following one of your reply some days ago, I took a test to decrypt the file downloaded from ” http://www.rightserver.com/fowp/” . First I applied from the website for a one-minute cookie and downloaded a fileopen PDF to my PC. Then I run the script to decrypt it . To my excitement, the file was successfully decrypted.

    Thank my dear tetrachroma! My great pal!

    So my problem is why I can’t decrypt the file from the “http://fileopen.bl.uk:8008” . Is it because I run the script before and I didn’t succeed. So fileopen fedback the information to
    fileopen.bl.uk. and they remembered my PC. I will not get the file decrypted forever??? Is that so???

    thanks again. Best regards!

    • August 2, 2010 at 7:08 pm

      bl.uk link works for me. The script goes (because of productive user input) through a rapid development phase. Remember: always use the newest version (2.4.27 (or higher) as described at the main page). Otherwise you may hit bugs which were already fixed.

      The pdf file downloaded from this bl.uk test site expires after a short time (minutes maybe hours). You have to re-download it and try again (with 2.4.27!).

      Btw. what character was in this unicode path? perhaps you can make a screenshot of the original path (windows explorer) and send it via email.

      Relax you are not banned. ^^

  3. January 13, 2014 at 6:06 pm

    Thanks for finally talking about >update to 8.4.22: disabled stdout prints for exception prevention | Tetrachroma’s Blog <Liked it!

  4. June 13, 2014 at 4:11 am

    In summary, if you need to lose weight, go anywhere and complete boot camp class.
    These substances are designed to help the body do what it naturally does,
    solely somewhat faster. The thermogenic and stimulants from Adiphene will help your body to burn the energy which are consumed throughout meals.

  5. September 19, 2014 at 7:59 am

    Hi, I do think your blog could possibly be having web browser compatibility issues.
    When I take a look at your blog in Safari, it looks fine however when opening
    in I.E., it’s got some overlapping issues. I simply wanted to give you a quick heads up!
    Aside from that, wonderful site!

  6. September 24, 2014 at 7:03 pm

    I’m really loving the theme/design of your web site.
    Do you ever run into any web browser compatibility
    issues? A few of my blog readers have complained
    about my site not working correctly in Explorer but looks great in Firefox.
    Do you have any solutions to help fix this issue?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 172 other followers

Recent Posts


%d bloggers like this: