PRO Package Project - Dataset not found message

2545
11
04-06-2022 11:39 AM
nabaz-gharib
Occasional Contributor

Hi all,

This post is a workaround for people who receives the message (Dataset not found message) when running Arcpro Project Packaging Tool.

The issue with this tool is, when you click on Analyze, it does not show any warning, but when you run the tool, it fails and shows this message:
Dataset not found message
The message does not give useful hints about what dataset makes the problem.
 
Solution:
The workaround to overcome this issue, is simply run the tool using Arcpy, because if the tool faild, it tells you exactly where the problem is, it provides a detail information about the issue, which is very easily can be found and fix it.
Just this line is enough to run:
arcpy.management.PackageProject(in_project, output_file)
if you got this issue, and fixed, please give us a thumb, or mark this as answer.
Tags (2)
11 Replies
Richard_Stokes
New Contributor II

It seems as though even if you exclude toolboxes from the package, Pro will still attempt to process them.

I had a project where I'd verified every data source yet still produced the 'database not found' error.  Attempting to share the project package as a template threw up a new set of errors showing that it had found invalid data sources in some temporary models in my default toolbox.  I had to delete all the models which didn't work anymore to get it to package properly.

Esri, please exclude toolboxes from the packaging process if the option is selected.

DaltonAiken1
New Contributor II

Thank you for this suggestion! Worked great for me when I deleted the model in my toolbox.

0 Kudos
Sarah_W
New Contributor

After a few tries I did get this method to work. But I'm going to post exactly what I did to hopefully help neophytes like me who need all the steps.

In ArcGIS Pro, I went to the Analysis tab and clicked "Python" in the Geoprocessing section.

In the New Notebook that opened, I entered the following bold text, specific names are in brackets and should be replaced and brackets removed.

import arcpy

in_project = "[project name].aprx"
output_file = "[output file path, with forward slashes, e.g. C:/ArcGIS Projects/etc].ppkx"

arcpy.management.PackageProject(in_project, output_file)

Then I hit "run" and it gave a very helpful set of error messages after it finished. 

Like others, it was custom tools (which I told it to exclude) that were the problem.

RalfWessels
New Contributor II

Hi,

I had the same "Dataset not found message" when I used the standard tool for creating project packages.

Then I tried the Tool "Package Project" from the Data Management Toolbox (https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/package-project.htm) with some more options. Here I got the same message, but with a with a specific reference to the Problem. It was a csv-File  loeded to a map and renamed afterwards. Just deleted the csv from my project and this tool worked fine.

0 Kudos
sblazeycov
New Contributor III

Thanks so much for this!  I kept getting the "Dataset not found" error, and I had checked all my file paths and everything I could think of but wasn't getting anywhere.

I ran the arcpy (Thanks also to Sarah_W for the detailed instructions in the comments, which were very helpful for me as I hadn't used the python window before). 

I ended up getting more details, specifically this error:
ExecuteError: ERROR 000210: Cannot create output C:\files...ProjectPackage. Failed to execute (PackageProject).

I had been using UNC paths to access the data, so I swapped that for a locally mapped drive instead, and ran it again.

Then I got this error:
ExecuteError: ERROR 001795: Failed to consolidate project due to problem with Geoprocessing History item: Package Project.

So I opened the Geoprocessing History (Analysis Tab > Geoprocessing section > History) and I deleted all of my previously failed project package attempts, plus, just in case, I deleted all the other items (feature class to feature class, regular old geoprocessing tasks that had worked) to completely clear it out.  After that, I ran the arcpy again and it completed successfully!

0 Kudos
sblazeycov
New Contributor III

update: I'm still struggling with this.  Although the Python ran successfully and output a .ppkx file, after the contractor opened it, it turned out that file didn't include all the data.  
I tried running Export to Map Package instead, but that also fails.  I can't win here.

0 Kudos
SW_Oz
by
New Contributor

I'm having a similar issue with a dataset not found error when sharing to a portal but I have no idea where this reference is. Just checking for your error, did you select the option 'share outside organisation' as that is meant to save any data that you are linked to in the package. 

0 Kudos
sblazeycov
New Contributor III

Yes, I did select 'share outside organization' and it still didn't work for me.  😞

0 Kudos
nabaz-gharib
Occasional Contributor

did you run the python script to get a more detail on the error?

0 Kudos