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

Error when converting .rm file #2

Open
antmar904 opened this issue Feb 14, 2023 · 5 comments
Open

Error when converting .rm file #2

antmar904 opened this issue Feb 14, 2023 · 5 comments

Comments

@antmar904
Copy link

Hello:

When running the following I get the following error:

rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf

rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf
Unknown block type 8. Skipping 17 bytes.
Unknown block type 8. Skipping 17 bytes.
Traceback (most recent call last):
File "/home/anthony/.local/bin/rmc", line 8, in
sys.exit(cli())
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/anthony/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/anthony/.local/lib/python3.10/site-packages/rmc/cli.py", line 37, in cli
convert_rm(Path(fn), to, fout)
File "/home/anthony/.local/lib/python3.10/site-packages/rmc/cli.py", line 91, in convert_rm
svg_to_pdf(buf, fout)
File "/home/anthony/.local/lib/python3.10/site-packages/rmc/exporters/pdf.py", line 36, in svg_to_pdf
check_call(["inkscape", fsvg.name, "--export-filename", fpdf.name])
File "/usr/lib/python3.10/subprocess.py", line 364, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.10/subprocess.py", line 345, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.10/subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'inkscape'

@hersle
Copy link

hersle commented Feb 14, 2023

From the last line and

 check_call(["inkscape", fsvg.name, "--export-filename", fpdf.name])

you can see that the SVG to PDF conversion is done with inkscape. You need to install it to your system first, and check that you can run it by typing inkscape in your terminal.

@ricklupton
Copy link
Owner

rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf
Unknown block type 8. Skipping 17 bytes.

@antmar904 can you share this file f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm and a description of how you made it / what it contains? It looks like it contains a new piece of data that hasn't come up before.

(this is unrelated to your main problem as hersle says)

@antmar904
Copy link
Author

antmar904 commented Feb 15, 2023

From the last line and

 check_call(["inkscape", fsvg.name, "--export-filename", fpdf.name])

you can see that the SVG to PDF conversion is done with inkscape. You need to install it to your system first, and check that you can run it by typing inkscape in your terminal.

I'm not a linux person, I think I installed inkscape by using:

sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt update
sudo apt install inkscape

I run the following command:

**rmc /home/User/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /home/User/TestRM/test.pdf
Unknown block type 8. Skipping 17 bytes.
Unknown block type 8. Skipping 17 bytes.

(inkscape:3367): WARNING : 07:09:23.979: Failed to wrap object of type 'GtkRecentManager'. Hint: this error is commonly caused by failing to call a library init() function.

I just realized that the test.pdf file has been successfully created. :)

@antmar904
Copy link
Author

rmc /mnt/c/Temp/TestRM/f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm -o /mnt/c/Temp/test.pdf
Unknown block type 8. Skipping 17 bytes.

@antmar904 can you share this file f57e211c-2fb6-4e8b-838f-74718ba12fc6.rm and a description of how you made it / what it contains? It looks like it contains a new piece of data that hasn't come up before.

(this is unrelated to your main problem as hersle says)

let me find out which file this is and what it contains before I can share it. Thank you again for all your help.

@justchokingaround
Copy link

any update?

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

4 participants