Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-26062

Fix python3 type encoding error on configs script

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0
    • 3.0.0
    • ambari-server
    • None

    Description

      Recent applied enhancement to integrate python3 AMBARI-26000

      has caused failure in updated encoder handler while fetching and pushing back config modifications.

      Traceback (most recent call last):
        File "/var/lib/ambari-server/resources/scripts/configs.py", line 112, in do_request
          response = urllib.request.urlopen(request)
        File "/usr/lib64/python3.9/urllib/request.py", line 214, in urlopen
          return opener.open(url, data, timeout)
        File "/usr/lib64/python3.9/urllib/request.py", line 514, in open
          req = meth(req)
        File "/usr/lib64/python3.9/urllib/request.py", line 1277, in do_request_
          raise TypeError(msg)
      TypeError: POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str. 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              shubh_init Shubham Sharma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m