Problem with model textures on windows

I am having a problem with textures of models in panda3d. I have created a panda 3d application and loaded my model in it. I tested the application on both ubuntu and mac Os and the textures appear on that model. However, for the same model, the textures donot appear on windows. The stranger thing is that sometimes an error appears as the one shown in the thread here Problem loading texture
and some times this error is suppressed.
I tried changing config.prc, by changing
model-path .
as well as setting the model path to the top directory containing all the models, but the texture still doesn’t appear. What could be the probem??

It might be the file-path, and in particular your directory separators: Windows uses back-slashes, while Ubuntu uses forward-slashes. (I’m not sure about Mac, admittedly.)

Where are you getting the file-paths for your textures? Are they specified in an egg/bam file? Loaded from command-line? Hard-coded? Something else?

They are specified in the egg file. I exported the egg file for the model from blender

Hm. Very odd, then.

Would you show us a snippet of your code, please–specifically, the section in which you load your model? (Along with any file-paths related to the model.)

If the model is something small, could you perhaps post it here? (You should be able to just drag-and-drop it into the edit-box for a new post.) If it’s not small, or you’re not comfortable with sharing it, could you try to reproduce the effect with something like a textured cube?
Here is the link of the model

and here is a screen shot for the loading

Hmm… I’m not sure that this is the problem, but I do note that you’re using the operating system’s paths, and thus its directory separators. You might try running your file paths through “Filename.fromOsSpecific” to get paths in the format that Panda uses. (See the API here.)

Something like this:

pandaFilename = Filename.fromOsSpecific(osFilename)
# Where "osFilename" is a variable containing your file-path;
#  change to suit your code.

# ... Do similarly for your animation-paths , making "pandaAnimFilenames"...

Actor(pandaFilename, pandaAnimFilenames)

I will try it out :smiley: .Thank you.

Thank you so much… It worked :smiley:

Ah, I’m glad that it did! :slight_smile: