Open Ajinkz opened 5 years ago
@c-smile Andrew, has something been changed in zip archive handling?
Nothing have changed in .ZIP handling respect.
Check if SciterLoadFile gets called with absolute path or absolute file URL.
@c-smile Well, it did work in past.
archive.zip contains "archived.htm".
It was referenced as "archive.zip#archived.htm" and it used to work.
Now, I get for "archive.zip#archived.htm" the following:
warning:dom: failed to load "d:/usr/lib/gui/htmlayout/pysciter/examples/archive.zip%archived.htm" file, error=2
And for "archive.zip/archived.htm":
"warning:dom: failed to load "d:/usr/lib/gui/htmlayout/pysciter/examples/archive.zip/archived.htm" file, error=3
The only thing that works is: "archive.zip" as URL with "index.htm" in it.
So, is it possible to load a specific HTML from a ZIP archive? If yes, how?
Is this relative URL: "pysciter/examples/archive.zip%archived.htm" ? I suspect that problem is on pysciter side - it does not provide absolute file:// .... URL or absolute path. Again Sciter has no notion of CWD - that's completely on Python,Go,C,whatever side .
No, it's an absolute url in all cases.
Check if https://github.com/c-smile/sciter-sdk/blob/master/samples/zip/test-explicit-main.htm works in wsciter/usciter on your machine.
No, it's an absolute url in all cases.
I suspect it is not absolute URL according to this:
raise sciter.SciterError("Unable to load file " + uri)
> Unable to load file **archive.zip#archived.htm**
Well, it's all about absolute paths.
URL "archive.zip#archived.htm" doesn't work anymore.
URL "d:/pysciter/examples/archive.zip#archived.htm" doesn't work either despite looking like an absolute URL.
URL "d:\pysciter\examples\archive.zip#archived.htm" doesn't work as well.
URL "file://d:\pysciter\examples\archive.zip#archived.htm" works. So, from some point in Sciter's history the file://
part is mandatory now.
But that leads us to a broken example with "archive.zip" - well, it was just a trick anyway.
By the way,has a way to load an ZIP with ZIP's password(prevent some body to modify the core files)?
OS: Windows 10 Python version: 3.6 Pysciter: 0.4.29
When I was trying to run
python ./archive.zip
I got this error