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

Unpacking of very old RPA not working #24

Open
madeddy opened this issue Nov 28, 2019 · 3 comments
Open

Unpacking of very old RPA not working #24

madeddy opened this issue Nov 28, 2019 · 3 comments
Labels
Bug Report Reporting a bug.

Comments

@madeddy
Copy link

madeddy commented Nov 28, 2019

Describe the bug

UnRPA is unable to unpack old Renpy archives with rpi extension (RPA-1.0 possibly)

Konsole output:

$  python3.7 -m unrpa /home/olli/Development/rpy/tstrpa/old/images.rpi
Extracting files from /home/olli/Development/rpy/tstrpa/old/images.rpi.                                                  
                                                                                                                         
There was an error while trying to extract a file from the archive.                                                      
If you wish to try and extract as much from the archive as possible, please use --continue-on-error.                     
Error Detail: Traceback (most recent call last):                                                                         
  File "/home/olli/.local/lib/python3.7/site-packages/unrpa/__init__.py", line 134, in extract_files                     
    version.postprocess(file_view, output_file)                                                                          
  File "/home/olli/.local/lib/python3.7/site-packages/unrpa/versions/version.py", line 24, in postprocess                
    for segment in iter(source.read1, b""):                                                                              
  File "/home/olli/.local/lib/python3.7/site-packages/unrpa/view.py", line 20, in read1                                  
    return self.base_read(lambda source: source.read1, amount)                                                           
  File "/home/olli/.local/lib/python3.7/site-packages/unrpa/view.py", line 34, in base_read                              
    return self.base_read(method, amount)                                                                                
  File "/home/olli/.local/lib/python3.7/site-packages/unrpa/view.py", line 37, in base_read                              
    raise Exception("End of archive reached before the file should end.")                                                
Exception: End of archive reached before the file should end.

How to reproduce the bug

Steps to reproduce the behaviour:

  1. Open my terminal in the directory 'cd /home/olli/.local/lib/python3.7/site-packages/unrpa/'
  2. Run the command 'python3 -m unrpa /home/olli/Development/rpy/tstrpa/old/images.rpi'
  3. Getting cited error

Alternate trys with a random location brings same outcome. e.g.

  1. Open my terminal in the directory: location of *rpi file
  2. Run the command 'unrpa images.rpi'
  3. Getting cited error

Expected behaviour

Successful extraction of archive content.

Files needed to demonstrate the issue

Can be acquired here: Games|Renpy
Good examples from this source would be "Wings" or "Dual Hearts". (DL < 10 MiB)

How are you running unrpa

  • OS: (K)Ubuntu 18.04.3 LTS
  • Installation Method: pip package
  • Python Version: 3.7.5
  • Unrpa Version: 2.2.0

Additional context

There are two Archive files for this RPA version: 'images.rpa' and 'images.rpi'
*rpi holds imo the index values and *.rpa the file data. It looks for me like UnRPA expects the data content in the rpi file.

@madeddy madeddy added the Bug Report Reporting a bug. label Nov 28, 2019
@Lattyware
Copy link
Owner

Thanks for the report, I'll take a look when I get a chance.

@madeddy
Copy link
Author

madeddy commented Dec 2, 2019

Take your time.
I just reported it for completeness. I noticed by chance.

RPA1 was last time used 15 years ago and i truly doubt many people want to unpack the somewhat 20 images of this old VNs. IMHO v1 could even be removed.

@Lattyware
Copy link
Owner

I think it's useful to have tooling for working with old formats, if nothing else, it helps support archival projects and history keeping, which is valuable, so I'll definitely take a look at fixing up support when I get a chance.

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

No branches or pull requests

2 participants