GithubHelp home page GithubHelp logo

Comments (8)

cledoux avatar cledoux commented on July 20, 2024

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.

SelaO avatar SelaO commented on July 20, 2024

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.

cledoux avatar cledoux commented on July 20, 2024

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.

SelaO avatar SelaO commented on July 20, 2024

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:

image

And here's a file that it happens with:
https://mega.nz/#!AZQHTTwR!fc7MDhjIflbTIhNxIjK9jHrPt2iwYbCVdZGi5g29w3o

from patool.

cledoux avatar cledoux commented on July 20, 2024

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.

dset0x avatar dset0x commented on July 20, 2024

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.

SelaO avatar SelaO commented on July 20, 2024

I want to extract everything that 7zip can extract not just zip.

from patool.

wummel avatar wummel commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.