SilentVoid13 / Templater

A template plugin for obsidian
https://silentvoid13.github.io/Templater
GNU Affero General Public License v3.0
3.23k stars 194 forks source link

Template not rendering web.random_picture #881

Open moorebi opened 1 year ago

moorebi commented 1 year ago
Windows 10 **Plugin information (please complete the following information):** - OS: Windows 10 - Templater version: 1.14.3 - Obsidian version: 1.0.2 - Templater settings: location = `bins/templates` is general folder.. the template in question is `bins/templates/temporal/daily.md` **Describe the bug** A clear and concise description of what the bug is. - When I launch the daily.md everything works very well except for the line in the template where I want to pull a random picture (right after the "daily quote" I get a broken link? then "photo by NAME OF PERSON on Unsplash" (see screen shot) **Expected behavior** A clear and concise description of what you expected to happen. - should get a image in my obsidian daily note. - **Screenshots** If applicable, add screenshots to help explain your problem. ![image](https://user-images.githubusercontent.com/6247939/197603036-39f92673-90d7-4f23-9c0e-820fc395733b.png) **Additional context** Add any other context about the problem here. [Daily.md](https://github.com/SilentVoid13/Templater/files/9854403/Daily.md)
slambert commented 1 year ago

Noticed today I got a Error generating random picture. In the console:

Failed to load resource: net::ERR_CONNECTION_RESET

templater-unsplash.fly.dev/:1

shabegom commented 1 year ago

You can hit the endpoint directly to see if it is up: https://templater-unsplash.fly.dev

shabegom commented 1 year ago

I'm unable to reproduce this. It renders an image when using the command from the same file you provided.

moorebi commented 1 year ago

Not sure i this helps but when I use the daily.md template file I still get the image

But when I go in and take away the "!" to leave [photo by Paul Talbot on Unsplash](https://images.unsplash.com/reserve/d1Ntvq9mSVmV0RcnWN1Y_23rd%2520Studios%2520Photography%2520Boulder%2520Colorado.jpg?crop=entropy&cs=tinysrgb&fm=jpg&ixid=MnwzNjM5Nzd8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NjgwODgwMzI&ixlib=rb-4.0.3&q=80&w=400&h=400)

and click on the hyperlink it takes me to the page with simply "404" on it...

is there a limit as to the number of keywords you can have in the query..... I have the following:

<%tp.web.random_picture("400x400", "landscape,water,nature,computer,hacker,technology")%>

AB1908 commented 1 year ago

Can you share your template?

moorebi commented 1 year ago

Can you share your template?

I did share in the original entry "Daily.md"

moorebi commented 1 year ago

Edit

Not sure i this helps but when I use the daily.md template file I still get the image

But when I go in and take away the "!" to leave [photo by Paul Talbot on Unsplash](https://images.unsplash.com/reserve/d1Ntvq9mSVmV0RcnWN1Y_23rd%2520Studios%2520Photography%2520Boulder%2520Colorado.jpg?crop=entropy&cs=tinysrgb&fm=jpg&ixid=MnwzNjM5Nzd8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NjgwODgwMzI&ixlib=rb-4.0.3&q=80&w=400&h=400)

and click on the hyperlink it takes me to the page with simply "404" on it...

is there a limit as to the number of keywords you can have in the query..... I have the following:

<%tp.web.random_picture("400x400", "landscape,water,nature,computer,hacker,technology")%>

EDIT 2022-11-16:

When I remove the "!" from the file and then click on the link it takes to me the image on unsplash.com.. but in the the file still "unrendered"