Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Davinci Console Error #1

Open
JuHoBe opened this issue Dec 6, 2024 · 8 comments
Open

Davinci Console Error #1

JuHoBe opened this issue Dec 6, 2024 · 8 comments

Comments

@JuHoBe
Copy link

JuHoBe commented Dec 6, 2024

Start-DaVinciExport : Der Parameter "ForegroundColor" kann nicht gebunden werden. Der Wert "#FF00FFFF" vom Typ "System.Windows.Media.Color" kann nicht in den Typ "System.ConsoleColor"
konvertiert werden.

I fixed the bug by changing line 287 instead of $Host.PrivateData.VerboseForegroundColor i used Cyan hardcoded.

@fstueber
Copy link
Contributor

fstueber commented Dec 6, 2024

Hi, thanks for feedback. Was it PowerShell 5.1 (old one) or PowerShell 7 (current one)?

@JuHoBe
Copy link
Author

JuHoBe commented Dec 6, 2024

Hi Frank,

It was the old one, because we use the old one via task scheduler.

@fstueber
Copy link
Contributor

fstueber commented Dec 6, 2024

ok, thanks. Will look for a workaround to eliminate this error.

@fstueber
Copy link
Contributor

fstueber commented Dec 6, 2024

Hmm, cannot reproduce this error. Could please give me your command sequence from Windows Task Planer? That would be great.

@JuHoBe
Copy link
Author

JuHoBe commented Dec 6, 2024

Import-Module PSDaVinci
Start-DaVinciExport sdui "C:\Users\Public\Documents\Stueber Systems\daVinci 6\Arbeitsbereich\davinci.json"

The task schdeduler just triggers this 2-line-script

@fstueber
Copy link
Contributor

fstueber commented Dec 6, 2024

One last: Which Windows environment?

@JuHoBe
Copy link
Author

JuHoBe commented Dec 6, 2024

Windows Server 2022 21H2 (Build 20348.2849)

@fstueber
Copy link
Contributor

fstueber commented Dec 6, 2024

You can substitute this line with:

$psVersion = $PSVersionTable.PSVersion.Major

if ($psVersion -ge 7) {
	Write-Host $stringTable.StartDaVinciConsole -ForegroundColor $Host.PrivateData.VerboseForegroundColor
} else {
	Write-Host $stringTable.StartDaVinciConsole
}

WriteHost seems to have some incompatibilities with PowerShell 5.1. A new official module versions will come later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants