Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwp5txt hwp5html hwp5odt error #165

Open
kyungyoonseo opened this issue Mar 20, 2019 · 3 comments
Open

hwp5txt hwp5html hwp5odt error #165

kyungyoonseo opened this issue Mar 20, 2019 · 3 comments

Comments

@kyungyoonseo
Copy link

kyungyoonseo commented Mar 20, 2019

hwp5txt 의 경우 IO Error 출력과 함께 output 파일이 나오지 않고,

hwp5html 의 경우 img 가 깨집니다 bin 디렉토리가 생성이 되기는하지만 변환과정에서 이미지는 누락되는지 엑박이 뜨고 경로찾아가면 디렉토리안을 가르킵니다.

hwp5odt 의 경우에도 output 으로는 완벽하게 같진않아도 어느정도 맞아떨어지게 되나 , 아쉬운것이 이미지가 안뜹니다 ㅠㅠ

답변 주시거나 팁 가이드 등 주시면 제가 고쳐서 사용하겠습니다.
시간이되신다면 소스 한번 검토해주시면 더욱 감사하겠습니다.

윈도우 10 에서 Python 2.7 버전 사용중이고 lxml 은 pip 를 통해 설치 했습니다.
답변 기다리겠습니다 감사합니다.

@kyungyoonseo
Copy link
Author

kyungyoonseo commented Mar 20, 2019

hwp5txt 스크립트 오류내용 첨부드립니다 ㅠㅠ 또한
2번째줄에 출력되는 ?끹꽬?담뀉?뉎꽮?곥꽩?뉎꽮?곥꽩?뉎꽮 는 콘솔창에 뿌려주는데 깨지는 현상도 있어서 이것또한 문의 드립니다..

C:\Users\apple\Desktop>hwp5txt "testtest.hwp"
?끹꽬?담뀉?뉎꽮?곥꽩?뉎꽮?곥꽩?뉎꽮
Traceback (most recent call last):
File "C:\Python27\Scripts\hwp5txt-script.py", line 11, in
load_entry_point('pyhwp==0.1b9', 'console_scripts', 'hwp5txt')()
File "c:\python27\lib\site-packages\hwp5\hwp5txt.py", line 92, in main
transform(hwp5file, dest)
File "c:\python27\lib\site-packages\hwp5\transforms_init_.py", line 48, in transform_hwp5
return transform_xhwp5(xhwp5path, output)
File "c:\python27\lib\site-packages\hwp5\plat_lxml.py", line 88, in transform_into_stream
return self._transform(inp_file, output)
File "c:\python27\lib\site-packages\hwp5\plat_lxml.py", line 98, in _transform
output.write(str(result))
IOError: [Errno 0] Error

@kyungyoonseo
Copy link
Author

hwp5html 의 경우 이미지가 없이 간단하게 하게되면 바로 아웃풋이나오지만 이미지가 존재하는 파일을 변환할 시에 다음과 같은 오류가 발생합니다.

Traceback (most recent call last):
File "C:\Python27\Scripts\hwp5html-script.py", line 11, in
load_entry_point('pyhwp==0.1b9', 'console_scripts', 'hwp5html')()
File "c:\python27\lib\site-packages\hwp5\hwp5html.py", line 161, in main
transform(hwp5file, dest)
File "c:\python27\lib\site-packages\hwp5\hwp5html.py", line 84, in transform_hwp5_to_dir
self.extract_bindata_dir(hwp5file, bindata_dir)
File "c:\python27\lib\site-packages\hwp5\hwp5html.py", line 122, in extract_bindata_dir
unpack(bindata_stg, bindata_dir)
File "c:\python27\lib\site-packages\hwp5\storage_init_.py", line 129, in unpack
f = item.open()
File "c:\python27\lib\site-packages\hwp5\filestructure.py", line 108, in open
return decompress(self.wrapped.open())
File "c:\python27\lib\site-packages\hwp5\compressed.py", line 71, in decompress
return StringIO(zlib.decompress(stream.read(), -15)) # without gzip header
zlib.error: Error -3 while decompressing data: invalid block type

@kyungyoonseo
Copy link
Author

hwp5odt 의 경우에도 html 과 비슷한 오류를 발생시킵니다. 이미지가 없는 간단한 파일의 경우 바로 변환됩니다.

Traceback (most recent call last):
File "C:\Python27\Scripts\hwp5odt-script.py", line 11, in
load_entry_point('pyhwp==0.1b9', 'console_scripts', 'hwp5odt')()
File "c:\python27\lib\site-packages\hwp5\hwp5odt.py", line 384, in main
transform(hwp5file, dest)
File "c:\python27\lib\site-packages\hwp5\hwp5odt.py", line 152, in transform_hwp5_to_package
f = bindata[name].open()
File "c:\python27\lib\site-packages\hwp5\filestructure.py", line 108, in open
return decompress(self.wrapped.open())
File "c:\python27\lib\site-packages\hwp5\compressed.py", line 71, in decompress
return StringIO(zlib.decompress(stream.read(), -15)) # without gzip header
zlib.error: Error -3 while decompressing data: invalid block type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant