Forum Discussion
Well, your "works fine" example is not exactly like your "Next line" example, so we know there is something different happening.
If you try commenting out the "publishFSFromFile" line and run the "Next line" example, does it work without giving the error?
- kmathur7 years agoOccasional Contributor
Hi
So the original code is using publishFSFromFile method 5 times (I am using it to test different file types). The openInViewer() works fine for the first time and failing after that. I can re order the methods but it always works fine for the first time and then failing.
So here is the complete code
exportService("Shapefile",resultFile);
publishFSFromFile(itemURL,"Shapefile",resultFile);
openInViewer(resultFile);exportService("CSV file",resultFile);
publishFSFromFile(itemURL,"CSV",resultFile)
openInViewer(resultFile);exportService("FGDB",resultFile);
publishFSFromFile(itemURL,"FGDB",resultFile)
openInViewer(resultFile);exportService("GeoJson",resultFile);
publishFSFromFile(itemURL,"GeoJSON",resultFile)
openInViewer(resultFile);So the code works fine for "Shapefile" and fails after that. If I bring "CSV file" part before that, I will execute perfectly for that and fails for "Shapefile"
- tristaanogre7 years agoEsteemed Contributor
So, again... what is going in on openInViewer? What is going on in your publishFSFromFile? All we can see is the methods your executing... the problem is probably something within one of those two methods or even both in some way... without the code, we can't help debug it.
- Marsha_R7 years agoModerator
Yes, what tristaanogre said. All we can go by is what you post and right now it seems to be a moving target. Post all the details at once and we can help better.
p.s. It might still be openInViewer but we don't have enough details to tell yet.
Related Content
Recent Discussions
- 22 hours ago