Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Mineral Catalog

Kevin Valverde
seal-mask
.a{fill-rule:evenodd;}techdegree
Kevin Valverde
Python Web Development Techdegree Student 8,722 Points

Image file names in mineral project. If there is a % then it doesn't load. If there isn't a % then it does. What to do ?

In the python techdegree mineral project, there is an image file for each mineral. These are provided in the project resources. They are named and some of the file names have % characters in them. When I attempt to link to the images from my project, the images that have % characters in the file names won't load. But the images that don't have % characters will load just fine.

Is there a special way to approach this? I don't want to have to write a script to update each file name and swap the % for another character. I would then have to update the db values with the same file names.

Am I missing something?

1 Answer

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Kevin;

Not sure what happened there, we had that experience early on and we updated the image files with new file names. I just updated that project again, so try to download the starter files again and see if that helps.

Happy coding,
Ken

Kevin Valverde
seal-mask
.a{fill-rule:evenodd;}techdegree
Kevin Valverde
Python Web Development Techdegree Student 8,722 Points

Thanks Ken. I'll have to re-initialize the database with the new data. Any pitfalls to watch out for? Is there an easy way to wipe and reload? I'll look it up but any pro tips would be great.

Kevin Valverde
seal-mask
.a{fill-rule:evenodd;}techdegree
Kevin Valverde
Python Web Development Techdegree Student 8,722 Points

Ok, I downloaded the updated project files but the .JSON file for the database still has the old path names to the images.

With 873 images it isn't practical to go through and manually update that.

Any possible way to update that as well and get a new JSON file in the project files?