DeployHubProject / DeployHub-Pro

DeployHub Pro Pipeline Status Project
https://www.openmakesoftware.com/application-release-automation-for-continuous-delivery/
Other
11 stars 4 forks source link

UnicodeDecodeError #253

Closed piyush94 closed 5 years ago

piyush94 commented 5 years ago

We are seeing error regarding the output displayed in the logs tab. image

image

This may be resolved by either moving to UTF-8 for decoding or ignoring the characters that are causing the error. CC: @svisagan83

sbtaylor15 commented 5 years ago

Updated to use decode('utf-8')

sbtaylor15 commented 5 years ago

Update is in latest version.

CC: @svisagan83

docker sha256:982c40417b54d57250fd874e15548d40ddfc7c780f43a09097714de73ca98835

sbtaylor15 commented 5 years ago

@piyush94 please upload a log showing the latest errors with utf-8 in place.

sbtaylor15 commented 5 years ago

@piyush94 any luck finding where the decode error is still happening?

piyush94 commented 5 years ago

@sbtaylor15 simulated the error using this: Write-Output "â" Error:

File "/opt/deployhub/engine/lib/dmtransfer", line 431, in 
    main()
  File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib64/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/opt/deployhub/engine/lib/dmtransfer", line 318, in main
    line = line.decode('ascii')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)

Also a follow up question to this, is there a way to automatically abort the deployment if any action or step results in error.

CC: @svisagan83

sbtaylor15 commented 5 years ago

@piyush94 - changed ascii to utf-8. CC: @svisagan83

pull latest

sbtaylor15 commented 5 years ago

@piyush94 - Since the test script is a function, the Write-Output "â" is caught as the return code and the second write Write-Output "1" is skipped. So I believe the decoding is working correctly just the test case is skewed. Lets re-open this issue if we run into another decoding problem.

CC: @svisagan83