VirtualFileSystem and HTTP on panda1.8

Hello !

I’m back with new VirtualFileSystem issue. I’ve upgraded to panda1.8 and a new problem appear with http and vfs.

Http can be mounted with a vfs as well and vfs.exists(“path/to/file”) return True but Filename() and Texture() doesn’t seems to locate files properly…

What have been the changes between 1.7.2 and 1.8 version of panda3d on http/vfs ?

Thanks

vash

Can you give a simple example of a program that worked in 1.7.2 but doesn’t work in 1.8.0?

David

Mmm ok I think, I understand a little bit more what’s going on.

It sounds like my previous issue mentionned in this post panda3d.org/forums/viewtopic … 3270#83270

It’s about PNMImage… again. So Texture and egg works well, but for PNMImage files can’t be found into a vfs without passing the exact path to the package. But in 1.7.2 it works for http mounted vfs… data are mounted into the start/ forlder (the actual root when panda3d is launched from the browser). So normally path should be good… but not in 1.8.0 for some reason ?!

Ok, it seems it’s not linked to that actually…
Here is a piece of code that worked before and doesn’t now :

from panda3d.core import Filename, VirtualFileSystem
from panda3d.core import PNMImage

vfs = VirtualFileSystem.getGlobalPtr()
vfs.mount(VirtualFileMountHTTP(myWebAdress), '/tmp', 0)
print "testing /tmp/world.png: " + str(vfs.exists("/tmp/world.png"))
print "testing /tmp/*/world.png: " + str(vfs.resolveFilename("world.png", "/tmp/"))
print "finding /tmp/*/world.png: " + str(vfs.findFile("world.png", "/tmp/"))
img = PNMImage()
img.read("/tmp/world.png")
print str(img)

and the output is :

Vash

Ok I’m back with new tests :

So on http mounted files I’ve got :

print _vfs.getMounts() # -> [/, http://mydomain.com/tmp/], OK
print _vfs->getFile(filename) # -> /path/to/the/file.txt, OK
print _vfs->getFile(filename).openReadFile(autoUnwrap) # -> None
print _vfs->getFile(filename).getMount() # doesn't print anything !

I’ve looked at the source code of panda without finding nothing that should failed…