Обсуждение: process_executor.py error
Hi Hackers,
--
Thanks,
Usman Muzaffar
QA Team
EnterpriseDB Corporation
While running API test cases, i encountered following error in process_executor.py file
==============================================
fp.write('EXCEPTION::\n{0}'.
TypeError: a bytes-like object is required, not 'str'
==============================================
so changed the file opening mode to 'a'. The API test cases are again run without this error with following versions
i) Python 2.7
ii) Python 3.4
iii) Python 3.5
iiii) Python 3.6
Please review the patch and commit.
EnterpriseDB Corporation
Вложения
+++ a little more information for the issue
i - The file(log_file) mode was 'ab' due to which it was throwing concatenation error.
ii- I have change the file opening mode to 'a' after which the issue is not encountered.
The issue can be reproduced as following
i) Enable Python 3.6 virtual environment
ii) move to web/regression folder
iii) trigger following command
python runtests.py --exclude feature_tests
iv) The terminal will show the error while any test case throws exception and that is caught.
On Thu, Oct 11, 2018 at 3:46 PM, Usman Muzaffar <usman.muzaffar@enterprisedb.com> wrote:
Hi Hackers,While running API test cases, i encountered following error in process_executor.py file============================================== fp.write('EXCEPTION::\n{0}'.
format(res)) TypeError: a bytes-like object is required, not 'str'
==============================
================
so changed the file opening mode to 'a'. The API test cases are again run without this error with following versionsi) Python 2.7ii) Python 3.4iii) Python 3.5iiii) Python 3.6Please review the patch and commit.--QA TeamUsman MuzaffarThanks,
EnterpriseDB Corporation
EnterpriseDB Corporation
Thanks, applied.
On Thu, Oct 11, 2018 at 12:51 PM Usman Muzaffar <usman.muzaffar@enterprisedb.com> wrote:
+++ a little more information for the issuei - The file(log_file) mode was 'ab' due to which it was throwing concatenation error.ii- I have change the file opening mode to 'a' after which the issue is not encountered.The issue can be reproduced as followingi) Enable Python 3.6 virtual environmentii) move to web/regression folderiii) trigger following commandpython runtests.py --exclude feature_testsiv) The terminal will show the error while any test case throws exception and that is caught.On Thu, Oct 11, 2018 at 3:46 PM, Usman Muzaffar <usman.muzaffar@enterprisedb.com> wrote:Hi Hackers,While running API test cases, i encountered following error in process_executor.py file==============================================fp.write('EXCEPTION::\n{0}'.format(res))
TypeError: a bytes-like object is required, not 'str'
==============================================
so changed the file opening mode to 'a'. The API test cases are again run without this error with following versionsi) Python 2.7ii) Python 3.4iii) Python 3.5iiii) Python 3.6Please review the patch and commit.--QA TeamUsman MuzaffarThanks,
EnterpriseDB Corporation--QA TeamUsman MuzaffarThanks,
EnterpriseDB Corporation
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company