Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Indesign Javacscript Error Code# 35869: Cannot create the link resource from the given URI

Community Beginner ,
Apr 05, 2020 Apr 05, 2020

I am having problem placing an image to a Rectangle object. My code actually works before on an Indesign of my office PC (not sure with the version).

 

But now as I try it to my laptop, it has an Error of code #35869. The image does exists. I have tried modifying the path but still got the error. 

 

I attached a link of the screenshot of the code and the error.
https://1drv.ms/u/s!Ag6AaBNH0sD171Jc5eyh_JsKVgls?e=ZTWBCA

 

I appreciate your help. Thank you!

TOPICS
Scripting
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 06, 2020 Apr 06, 2020

In your screenshot, it looks like there's a space at the start of the path (" D:\\") . Check there maybe, or post a screenshot of where ImagePath is actually being generated?

Translate
Community Expert ,
Apr 05, 2020 Apr 05, 2020

Not sure, but i think the path in the imagePath variable is escaped wrongly. The path should have only a \, \\ should appear if you are writing the path in the code as a literal string. however i see \\ in the debug window as well. Change the argument passed into the addPhoto function to have just \\ and not \\\\ and then see what happens

 

-Manan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2020 Apr 05, 2020

I have tried that already but still no luck.

https://1drv.ms/u/s!Ag6AaBNH0sD171MSMbJopkmUPEzD?e=meVGZC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2020 Apr 05, 2020

Is the issue with this path particularly, i mean does the code work with the same image placed at a different location, or are you not able to use this code for placing any image file?

 

-Manan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 05, 2020 Apr 05, 2020

This code actually works in my office PC. I will try to put it in other location.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 06, 2020 Apr 06, 2020

I have tried putting the images to other location but still got the error.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 06, 2020 Apr 06, 2020

But when I hardcoded the path, it works.

frame.place("D:\\dn\\clients\\sica\\images\\33-012.jpeg");
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2020 Apr 06, 2020

In your screenshot, it looks like there's a space at the start of the path (" D:\\") . Check there maybe, or post a screenshot of where ImagePath is actually being generated?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 06, 2020 Apr 06, 2020

OMG! You are correct Brian! That very small mistake took me days. Thank you so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2020 Apr 06, 2020
LATEST

Gotta love Extendscript debugging! Glad I could help. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines