Comments (8)
Can you provide example scripts that replicate error? I'm having a similar issue, but can't seem to replicate on a file that I can share (the file causing the error contains sensitive information and thus cannot be shared).
from patool.
Make an empty (or with some files) 7z archive with one of the names I gave.
Here's a minimal script where it happens.
import os
import shutil
from pyunpack import Archive
tmpFolder = './tmp/'
shutil.rmtree(tmpFolder, True)
files = [f for f in os.listdir('.') if os.path.isfile(f) and (
f.endswith('.7z') or f.endswith('.zip') or f.endswith('.rar')
)]
for filename in files:
try:
Archive(filename).extractall(tmpFolder, True)
except Exception as e:
print("error: " + str(e))
shutil.rmtree(tmpFolder, True)
continue
from patool.
It fails to replicate on my system. I'm on Ubuntu 16.04 and used both python 2.7 and python 3.5. It works whether I use to script you provided or use patool
from the command line. Replication steps below.
If I get some time later, I might see if I can replicate on Windows to help you out. It'll require digging a VM out, though, as I don't have any windows machines handy.
Not sure if it matters, but which version of Windows are you running?
>>> echo "(C86) [C-CLAYS] - 番ヒノ翼 -ツガヒノツバサ-.7z" > text
>>> 7z a "(C86) [C-CLAYS] - 番ヒノ翼 -ツガヒノツバサ-.7z" text
>>> patool extract "(C86) [C-CLAYS] - 番ヒノ翼 -ツガヒノツバサ-.7z"
patool: Extracting (C86) [C-CLAYS] - 番ヒノ翼 -ツガヒノツバサ-.7z ...
patool: running /usr/bin/7z x -o./Unpack_qdcJs2 -- "(C86) [C-CLAYS] - 番ヒノ翼 -ツガヒノツバサ-.7z"
patool: ... (C86) [C-CLAYS] - 番ヒノ翼 -ツガヒノツバサ-.7z extracted to `(C86) [C-CLAYS] - 番ヒノ翼 -ツガヒノツバサ-' (local file exists).
>>> echo "(C92) 幽閉 少女 ア ク テ ィ ブ NEETs - 第 3 幕 協奏曲 「華 鳥 風月」 SIDE B [KNCD-0015].rar" > text
>>> 7z a "(C92) 幽閉 少女 ア ク テ ィ ブ NEETs - 第 3 幕 協奏曲 「華 鳥 風月」 SIDE B [KNCD-0015].rar" text
>>> patool extract "(C92) 幽閉 少女 ア ク テ ィ ブ NEETs - 第 3 幕 協奏曲 「華 鳥 風月」 SIDE B [KNCD-0015].rar"
patool: Extracting (C92) 幽閉 少女 ア ク テ ィ ブ NEETs - 第 3 幕 協奏曲 「華 鳥 風月」 SIDE B [KNCD-0015].rar ...
patool: running /usr/bin/7z x -o./Unpack_lPBosM -- "(C92) 幽閉 少女 ア ク テ ィ ブ NEETs - 第 3 幕 協奏曲 「華 鳥 風月」 SIDE B [KNCD-0015].rar"
patool: ... (C92) 幽閉 少女 ア ク テ ィ ブ NEETs - 第 3 幕 協奏曲 「華 鳥 風月」 SIDE B [KNCD-0015].rar extracted to `(C92) 幽閉 少女 ア ク テ ィ ブ NEETs - 第 3 幕 協奏曲 「華 鳥 風月」 SIDE B [KNCD-0015]' (local file exists).
This works for both python 2.7 and python 3.5.
from patool.
I'm on python 3.6.4, win 10 64b.
Did the archives you made had files in? That's the settings I used to make the 7zs:
And here's a file that it happens with:
https://mega.nz/#!AZQHTTwR!fc7MDhjIflbTIhNxIjK9jHrPt2iwYbCVdZGi5g29w3o
from patool.
The file you provided extracts just fine on Ubuntu.
I used docker to test on python3.6 and it still works just fine.
My guess is that it's a Windows specific bug that will require Windows to replicate.
from patool.
It's likely that you're looking for
UNZIP="-O cp932" unzip *.zip
Sorry, no comments integrating this in patool
. I've been using atool
and just ran into this by accident.
Edit: Not running windows, but I hope it gets the idea across.
from patool.
I want to extract everything that 7zip can extract not just zip.
from patool.
A new version 1.14.1 of patool has been released on
26.10.2023.
Therefore this bug will be closed. If you think this issue is not solved,
please open a new issue.
from patool.
Related Issues (20)
- It is possible to extract control.tar.gz in a debian package HOT 1
- "returned non-zero exit status 7" when using winrar 2.0 HOT 2
- patool is multithreaded? HOT 2
- Grab archives' integeritiy test result HOT 4
- Release a new version HOT 5
- patoolib.util.PatoolError: could not find an executable program to extract format compress HOT 2
- Please support zstd format `.zst` HOT 2
- "internal error" when extracting a RAR into an inexistent --outdir HOT 1
- Internal error "TypeError: '>=' not supported between instances of 'str' and 'int'" HOT 1
- Patool `oops I did it again` error HOT 1
- Я получаю ошибку при распаовке архива, потому что в названии архива присутствует смайлик ❤️ HOT 1
- file "x" was not found HOT 1
- --force-local option for tar isn't supported in macOS HOT 1
- [feature request] bash completion HOT 1
- Add bzip3 support HOT 1
- Inconsistent behavior with --outdir. HOT 1
- Compression level options for bzip3 is invalid HOT 1
- Update CHM parsing HOT 3
- Missing some information in Readme.txt HOT 1
- How to decompress zip volume xxx.zip, xxx.z01 and xxx.z02 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from patool.