Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
When running the 7_migrateapps.ps1 script I get the following error:
Warning: the app is targeted to be imported in a space that does not exist in the tenant. Please add the 'SPACE_NAME' space to your tenant and re-import the app.
The space SPACE_NAME is a shared space and exists in the tenant. It seems the 7_migrateapps.ps1 is failing to filter the space in the following statement:
$evaluatedspace= qlik space ls --filter ('name eq \"' + $evaluatedpacename + '\"') | ConvertFrom-Json
Error: {
"code": "",
"title": "filter not valid",
"detail": "filter attribute is not supported",
"errors": [
{
"code": "Spaces-65",
"title": "filter not valid",
"detail": "filter attribute is not supported",
"meta": {}
}
],
"traceId": "79ff8dc1a49a419bef1dda6a5a734b04"
}
Any help is appreciated.
So, I did more tests and the problem is with the escape characters, which behave differently on the standard Windows Powershell and Powershell run on non-Windows platforms.
When running scripts on Mac or other unix platforms, the \ before the " needs to be removed.
So:
qlik space ls --filter('name eq \"Shared\"') - works on Powershell for Windows, doesn't work on Powershell for Mac
qlik space ls --filter('name eq "Shared"') - works on Powershell for Mac, doesn't work on Powershell for Windows
----
So, assuming you are using a non-Windows version of the Powershell, I would recommend trying to change
$evaluatedspace= qlik space ls --filter ('name eq \"' + $evaluatedpacename + '\"') | ConvertFrom-Json
into
$evaluatedspace= qlik space ls --filter ('name eq "' + $evaluatedpacename + '"') | ConvertFrom-Json
----
If you are using Powershell for Windows, then it's something related to escape characters in your environment.
Thanks Daniele! I'm working in Windows Server.
UPDATE: I was using version 7 of Powershell and switched to version 5. Now it works properly.
Hi @FranciscoQ ,
by any chance.... are you running the powershell on a Mac?
I tried to run the same exact command on a powershell for Mac, and I am getting your same error:
qlik space ls --filter('name eq \"Shared\"')
Flag "filter" is experimental and it may change between releases.
Error: {
"code": "",
"title": "filter not valid",
"detail": "filter attribute is not supported",
---
The same exact command works on a Powershell for Windows, so I suspect it might be something environmental.
So, I did more tests and the problem is with the escape characters, which behave differently on the standard Windows Powershell and Powershell run on non-Windows platforms.
When running scripts on Mac or other unix platforms, the \ before the " needs to be removed.
So:
qlik space ls --filter('name eq \"Shared\"') - works on Powershell for Windows, doesn't work on Powershell for Mac
qlik space ls --filter('name eq "Shared"') - works on Powershell for Mac, doesn't work on Powershell for Windows
----
So, assuming you are using a non-Windows version of the Powershell, I would recommend trying to change
$evaluatedspace= qlik space ls --filter ('name eq \"' + $evaluatedpacename + '\"') | ConvertFrom-Json
into
$evaluatedspace= qlik space ls --filter ('name eq "' + $evaluatedpacename + '"') | ConvertFrom-Json
----
If you are using Powershell for Windows, then it's something related to escape characters in your environment.
Thanks Daniele! I'm working in Windows Server.
UPDATE: I was using version 7 of Powershell and switched to version 5. Now it works properly.
I just realized that my Windows version of Powershell is also 5 and the Mac one is 7. So, yes... the issue might be there. I'll report this internally, thanks!