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

SyntaxWarning: invalid escape sequence '\s' #109

Open
simone80an opened this issue Dec 17, 2024 · 0 comments
Open

SyntaxWarning: invalid escape sequence '\s' #109

simone80an opened this issue Dec 17, 2024 · 0 comments

Comments

@simone80an
Copy link

I have latest Rundeck OSS 5.8.0 running in a Windows Server 2019 VM, Python version installed 3.13.1 and latest py-winrm-plugin v.2.1.3.

When i execute a Powershell script i made i get SyntaxWarning: invalid escape sequence '\s' in the output.

The script:

if (Get-Service -Name "@option.servizio@") {
$arrService = Get-Service -Name "@option.servizio@"
Restart-Service -Name "@option.servizio@"
write-host 'Restarting service @option.servizio@'

Start-Sleep -seconds 10

$arrService.Refresh()

if ($arrService.Status -eq 'Running')
{
    Write-Host '@option.servizio@ is now running'
} else {
    Write-Host '@option.servizio@ is stopped, notifying...'
    exit 1
}

} else {
    Write-Host "@option.servizio@ service doesn't exists."
}

the option servizio has the following list of allowed values: NETA Schedulatore Amministratore Service,NETABollengWrapperService,Neta Etl Service,NETA Reports Service,NETA OutputFile Service

The output:

C:\rundeck\libext\cache\py-winrm-plugin-2.1.3\common.py:35: SyntaxWarning: invalid escape sequence '\s'
regexpMultipleAbsolutePath = re.compile(''[a-zA-Z]:\\.\s[a-zA-Z]:\\.') #at least two absolute paths
C:\rundeck\libext\cache\py-winrm-plugin-2.1.3\common.py:39: SyntaxWarning: invalid escape sequence '\s'
regexpPathAndOption = re.compile(''[a-zA-Z]:\\.\s/.+')
C:\rundeck\libext\cache\py-winrm-plugin-2.1.3\common.py:43: SyntaxWarning: invalid escape sequence '\s'
regexpPathAndOptionUnix = re.compile(''[a-zA-Z]:\\.
\s-.+')
C:\rundeck\libext\cache\py-winrm-plugin-2.1.3\common.py:47: SyntaxWarning: invalid escape sequence '\s'
regexPathRequireQuotes = re.compile(''[a-zA-Z]:\\.*\s')
Riavvio servizio NETABollengWrapperService
NETABollengWrapperService è ora in esecuzione

However the job complete OK and the script does what i expect.

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

1 participant