cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
prohannes
New Member

Power Platform CLI - pac data export throws "Error: Value cannot be null. Parameter name: path"

I tried to play around with the pac data export, but it always ends up with

 

Error: Value cannot be null.
Parameter name: path

Here's what I've done:

PS C:\bin\coretools> pac install latest
Feeds used:
https://api.nuget.org/v3/index.json
Installing package 'Microsoft.PowerApps.CLI' to 'C:\Users\****\AppData\Local\Microsoft\PowerAppsCLI'.
GET https://api.nuget.org/v3/registration5-gz-semver2/microsoft.powerapps.cli/index.json
OK https://api.nuget.org/v3/registration5-gz-semver2/microsoft.powerapps.cli/index.json 473ms
Package "Microsoft.PowerApps.CLI.1.19.4" is already installed.
PS C:\bin\coretools> pac data export --schemaFile "C:\bin\coretools\currency.xml"
Microsoft PowerPlatform CLI
Version: 1.19.4+gfbe2fd6

Error: Value cannot be null.
Parameter name: path

Usage: pac data export --schemaFile [--dataFile] [--overwrite] [--verbose] [--environment]

--schemaFile Schema file name. It can be created using Configuration Migration Tool (alias: -sf)
--dataFile File name for data zip file. Default data.zip (alias: -df)
--overwrite Allow overwrite output data file if it already exists (alias: -o)
--verbose Output more diagnostic information during data import/export (alias: -v)
--environment Environment (id, org id, url, unique name or partial name) (alias: -env)

PS C:\bin\coretools>

 Any suggestion?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Ah, ok, I understand now. Yeah, that error message isn't as helpful as it should be. What it's trying to say is that you need to provide a path for where to save the zip file once it's been exported. That is the --dataFile parameter. Screenshot below should be exactly what you're looking for:

cchannon_0-1668519030469.png

 

View solution in original post

ok, I did not try to set --dataFile as it has a default "data.zip"
Anyway, thanks!

View solution in original post

4 REPLIES 4
cchannon
Super User
Super User

🤷 Uninstall PAC and reinstall it?

---
PS C:\bin\coretools> pac data export --schemaFile "C:\bin\coretools\currency.xml"
Microsoft PowerPlatform CLI
Version: 1.19.4+gfbe2fd6

Error: Value cannot be null.
Parameter name: path
---

does not work

Ah, ok, I understand now. Yeah, that error message isn't as helpful as it should be. What it's trying to say is that you need to provide a path for where to save the zip file once it's been exported. That is the --dataFile parameter. Screenshot below should be exactly what you're looking for:

cchannon_0-1668519030469.png

 

ok, I did not try to set --dataFile as it has a default "data.zip"
Anyway, thanks!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,490)