Solved

failed to open document without reason

  • 1 February 2021
  • 5 replies
  • 17 views

Badge +1

Hi!

Since few time I have an error at the begining of the translation.

PDF Reader: Failed to open document "xxx\\*.pdf"because it does not exist or because the reader does not have permission to access the file

I replace the path by "xxx" for this post.

The path is good and I have permission because when I choose just 1 file manually it works. The problem seems to come to the relative path with the " * ".

I don't see that is the problem.

Can you help me?

 

Thanks!

icon

Best answer by caracadrian 1 February 2021, 16:50

View original

5 replies

Badge +20

Can you give a more detailed example of the relative path you use. I never got such an error. I even read ".\\abc\\*.pdf" or "\\*.pdf", as all pdf files from the directory that contains the workspace (or $(FME_MF_DIR)\\*.pdf).

As a workaround you can use the Directory and File Pathnames reader, a filter and a FeatureReader.

Also check your filenames for diacritics or other funky characters.

Badge +1

thanks for your answer!

 

My path is "$(NOMPATH)\\*.pdf"

And on the translation parameters, the user choose the folder that is used for the parameter $(NOMPATH).

The path is good because the user navigate to choose the folder and also because FME works when I open these files on a new FME project.

But it's strange, because sometimes it works and sometimes not. And that change also with the user machine...

It concern pdf, but also shp. It works very well until now.

My version is 2018.1 build 18552.

Is it a bug?

Badge +20

thanks for your answer!

 

My path is "$(NOMPATH)\\*.pdf"

And on the translation parameters, the user choose the folder that is used for the parameter $(NOMPATH).

The path is good because the user navigate to choose the folder and also because FME works when I open these files on a new FME project.

But it's strange, because sometimes it works and sometimes not. And that change also with the user machine...

It concern pdf, but also shp. It works very well until now.

My version is 2018.1 build 18552.

Is it a bug?

Can you supply a log file for when you get the error?

Badge +1

Can you supply a log file for when you get the error?

Not for the moment because it works again but if I have the problem again I will post the log file.

Thanks

Badge +1

Hi!

To close the post. I think the problem come from some special character like " ", "-" or "_", combine with serveur connexion, I think FME read litteraly "$(NOMPATH)\\*.pdf" instead of the real path.

I think that after reading this help page where is identified all the cases where a path is not very well recognize :

http://docs.safe.com/fme/2018.1/html/FME_Desktop_Documentation/FME_ReadersWriters/path/PATH_reader.htm

So your method works very well @caracadrian​ 

Thanks!

Reply