IOError: [Errno 21]

64 views
Skip to first unread message

unic...@gmail.com

unread,
Feb 2, 2013, 8:12:30 PM2/2/13
to chm...@googlegroups.com
Hi,
i am having problems with converting larger chm files to pdf.
Error Example:
Traceback (most recent call last):
  File "/usr/bin/chm2pdf", line 1108, in <module>
    main(sys.argv)
  File "/usr/bin/chm2pdf", line 1102, in main
    convert_to_pdf(cfile, filename, outputfilename, options)
  File "/usr/bin/chm2pdf", line 387, in convert_to_pdf
    correct_file(re.sub('\\\\ ', ' ', page_filename), htmlout_filename, html_list, objective_urls, options)
  File "/usr/bin/chm2pdf", line 131, in correct_file
    pf=open(input_file,'rU')
IOError: [Errno 21] Is a directory: '/tmp/tmpW2MqGn/test_larger/'

Any suggestions?

Cheers

ms

unread,
Feb 3, 2013, 6:25:00 AM2/3/13
to chm...@googlegroups.com
I can't understand the issue without:
- the original chm file
- the exact command line you did
- the operating system and python version
> --
> Hai ricevuto questo messaggio perch� sei iscritto al gruppo "chm2pdf" di
> Google Gruppi.
> Per annullare l'iscrizione a questo gruppo e non ricevere pi� i suoi
> messaggi, invia un'email a chm2pdf+u...@googlegroups.com.
> Per postare messaggi in questo gruppo, invia un'email a
> chm...@googlegroups.com.
> Visita questo gruppo all'indirizzo
> http://groups.google.com/group/chm2pdf?hl=it.
> Per ulteriori opzioni, visita https://groups.google.com/groups/opt_out.
>
>


--
Massimo Sandal, Ph.D.
http://devicerandom.org

unic...@gmail.com

unread,
Feb 3, 2013, 11:37:52 AM2/3/13
to chm...@googlegroups.com
Sorry, i am having problem uploading file because my connection is braking every 30min :// ..... i'll post link when i upload him (app 90 MB)...

Whatever command i execute on this file or any larger one i have that error, on "normal" (smaller) ones works well:
/usr/bin/chm2pdf --webpage --verbose test.chm test.pdf
I am using Ubuntu 12.04.2 LTS 3.2.0-37-generic-pae and python 2.7.3 [GCC 4.6.3]

Thanks!


On Sunday, February 3, 2013 12:25:00 PM UTC+1, massimo s. wrote:
I can't understand the issue without:
- the original chm file
- the exact command line you did
- the operating system and python version



On 03/02/13 02:12, unic...@gmail.com wrote:
> Hi,
> i am having problems with converting larger chm files to pdf.
> Error Example:
> Traceback (most recent call last):
>    File "/usr/bin/chm2pdf", line 1108, in <module>
>      main(sys.argv)
>    File "/usr/bin/chm2pdf", line 1102, in main
>      convert_to_pdf(cfile, filename, outputfilename, options)
>    File "/usr/bin/chm2pdf", line 387, in convert_to_pdf
>      correct_file(re.sub('\\\\ ', ' ', page_filename), htmlout_filename,
> html_list, objective_urls, options)
>    File "/usr/bin/chm2pdf", line 131, in correct_file
>      pf=open(input_file,'rU')
> IOError: [Errno 21] Is a directory: '/tmp/tmpW2MqGn/test_larger/'
>
> Any suggestions?
>
> Cheers
>
> --
> Hai ricevuto questo messaggio perch� sei iscritto al gruppo "chm2pdf" di
> Google Gruppi.
> Per annullare l'iscrizione a questo gruppo e non ricevere pi� i suoi

unic...@gmail.com

unread,
Feb 3, 2013, 5:08:38 PM2/3/13
to chm...@googlegroups.com
It doesnt have anything with large chm's.
Now when i look at it problem is PageLister class wher appends urls to variable it never checks for empty or incorect urls.
It should be something like this on line 65:

if urlparam_flag and key=='value' and value != "" or value != "/":

now works good!
Reply all
Reply to author
Forward
0 new messages