Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZAM4-0002Ug-F4 for pgadmin-hackers@arkaria.postgresql.org; Wed, 10 Jan 2018 06:59:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eZAM4-00017Y-1u for pgadmin-hackers@arkaria.postgresql.org; Wed, 10 Jan 2018 06:59:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eZAM3-00017O-LM for pgadmin-hackers@lists.postgresql.org; Wed, 10 Jan 2018 06:59:19 +0000 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eZAM0-0003PP-4f for pgadmin-hackers@postgresql.org; Wed, 10 Jan 2018 06:59:18 +0000 Received: by mail-oi0-x22e.google.com with SMTP id n81so8424577oig.8 for ; Tue, 09 Jan 2018 22:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6ys0zjOb7wfNnM+RsxIoE3+MgbcmsWIVx/xRLQ8fCZk=; b=kzVYP8hDuuM3CLuYk9bddvTTih5nDMuAdGAACT+tEYfeHiDQ0fDDv8Jm4LJNbAbhZa tXpCPbdupiUELleax1wt0Xx0Oj0zsRPnLDtrhMDuHZbFi9LGKFITkpUiLDxdzh3exXY+ scD114TBtgi1krmXnt2/zWwX03KToOlOr4r3LEyCI3W4BnXWM5cA7ufI+gIw7B+Uobs4 o4rmhaGAZx2gF6GAR3SNZ8rzAWTPYJnseqVmRbobl/SITgWzS1Qgyubl6qZRyCb5oQIU niAZCsoUQ5DlS3sfavYHEbAcB+qZqKMhWcvrSFr38gjr0uvlx9h3uFNPN826qqSrLXv3 fXDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6ys0zjOb7wfNnM+RsxIoE3+MgbcmsWIVx/xRLQ8fCZk=; b=N1gPXs5Uo6NeWLigwleghqMd25R2FO8X9ujEkS+s0KjQQ1bTJTnzTb5RdepB/P4GD5 zNdeqYzaxKQCRVp515brSXGlH/1oX7hP/Q4KLA+5ZyUYJ+CwBFnMaz9FcnaRxqOYwCb9 CcHu3cXQGj7qsmxlSIOvosoe35CKT9tpYgS9oiaBWOwR7uOSBgJl22lz6roOe4xZ5N4+ L/BXDiX8ajq0zsqgDjNHBUAch8mqcEQ742DuVOZBUX+ObYBG35/fu7n3dEFL1h7CSyKG PRPRIinjlTaSl5la8Fqb+7mKlIvzFhunPzaq7xp0m13zesXHAEXeNFtsSiqbSegg/hDs J4VA== X-Gm-Message-State: AKGB3mKO9K5hNYTSc8IP7w6ewVyBGr0QhrWcDBdMCVdoJ371tv2kIp2Y qIwJr8/kI/hBVQ/cfGgOaQpKQGAP8aPuznjVA6scNQ== X-Google-Smtp-Source: ACJfBovyZ0692j6orPe78MsS8RVQ3rT0LXoir4xInxN568s45sMxqucmpo3pdxr6BQIs5nNFPl38jcyqYFS3xO/OdIU= X-Received: by 10.202.66.193 with SMTP id p184mr9244407oia.231.1515567554247; Tue, 09 Jan 2018 22:59:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.165.141 with HTTP; Tue, 9 Jan 2018 22:59:13 -0800 (PST) In-Reply-To: References: From: Khushboo Vashi Date: Wed, 10 Jan 2018 12:29:13 +0530 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BpgAdmin4=5D=5BPatch=5D=3A_RM_=232963_=2D_Backup_database=2C_R?= =?UTF-8?Q?estore_database_and_Maintenance_Database_failed_for_=C3=A9_objec?= =?UTF-8?Q?t=2E?= To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary="001a113d7502b477e905626691c1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a113d7502b477e905626691c1 Content-Type: multipart/alternative; boundary="001a113d7502b477e505626691bf" --001a113d7502b477e505626691bf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 3, 2018 at 8:54 PM, Dave Page wrote: > Hi > > On Mon, Dec 25, 2017 at 11:03 AM, Khushboo Vashi < > khushboo.vashi@enterprisedb.com> wrote: > >> Hi, >> >> Please find the attached patch to fix RM #2963: Backup database, Restore >> database and Maintenance Database failed for =C3=A9 object. >> > > With the patch applied, I get: > > 2018-01-03 15:23:00,110: INFO pgadmin: Executing the process executor > with the arguments: ['/Users/dpage/.virtualenvs/pgadmin4/bin/python', > '/Users/dpage/git/pgadmin4/web/pgadmin/misc/bgprocess/process_executor.py= ', > '/usr/local/pgsql/bin/pg_dump', u'--file', u'/Users/dpage/e.sql', > u'--host', u'localhost', u'--port', '5432', u'--username', u'postgres', > u'--no-password', u'--verbose', u'--format=3Dc', u'--blobs', u'\xe9'] > 2018-01-03 15:23:00,117: INFO werkzeug: 127.0.0.1 - - [03/Jan/2018 > 15:23:00] "POST /backup/job/1/object HTTP/1.1" 200 - > Exception in thread Thread-6: > Traceback (most recent call last): > File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/pyth= on2.7/threading.py", > line 810, in __bootstrap_inner > self.run() > File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/pyth= on2.7/threading.py", > line 763, in run > self.__target(*self.__args, **self.__kwargs) > File "/System/Library/Frameworks/Python.framework/Versions/2.7/ > lib/python2.7/SocketServer.py", line 602, in process_request_thread > self.handle_error(request, client_address) > File "/System/Library/Frameworks/Python.framework/Versions/2.7/ > lib/python2.7/SocketServer.py", line 599, in process_request_thread > self.finish_request(request, client_address) > File "/System/Library/Frameworks/Python.framework/Versions/2.7/ > lib/python2.7/SocketServer.py", line 334, in finish_request > self.RequestHandlerClass(request, client_address, self) > File "/System/Library/Frameworks/Python.framework/Versions/2.7/ > lib/python2.7/SocketServer.py", line 655, in __init__ > self.handle() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/we= rkzeug/serving.py", > line 200, in handle > rv =3D BaseHTTPRequestHandler.handle(self) > File "/System/Library/Frameworks/Python.framework/Versions/2.7/ > lib/python2.7/BaseHTTPServer.py", line 340, in handle > self.handle_one_request() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/we= rkzeug/serving.py", > line 235, in handle_one_request > return self.run_wsgi() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/we= rkzeug/serving.py", > line 177, in run_wsgi > execute(self.server.app) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/we= rkzeug/serving.py", > line 165, in execute > application_iter =3D app(environ, start_response) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 2000, in __call__ > return self.wsgi_app(environ, start_response) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 1991, in wsgi_app > response =3D self.make_response(self.handle_exception(e)) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 1567, in handle_exception > reraise(exc_type, exc_value, tb) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 1988, in wsgi_app > response =3D self.full_dispatch_request() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 1641, in full_dispatch_request > rv =3D self.handle_user_exception(e) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 1544, in handle_user_exception > reraise(exc_type, exc_value, tb) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 1639, in full_dispatch_request > rv =3D self.dispatch_request() > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask/app.py", > line 1625, in dispatch_request > return self.view_functions[rule.endpoint](**req.view_args) > File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/fl= ask_login.py", > line 792, in decorated_view > return func(*args, **kwargs) > File "/Users/dpage/git/pgadmin4/web/pgadmin/misc/bgprocess/__init__.py"= , > line 62, in index > return make_response(response=3DBatchProcess.list()) > File "/Users/dpage/git/pgadmin4/web/pgadmin/misc/bgprocess/processes.py= ", > line 512, in list > desc =3D loads(p.desc) > File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/pyth= on2.7/pickle.py", > line 1381, in loads > file =3D StringIO(str) > UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in > position 138: ordinal not in range(128) > > Fixed. Please find the attached updated patch. > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > --001a113d7502b477e505626691bf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Jan 3, 2018 at 8:54 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Mon, D= ec 25, 2017 at 11:03 AM, Khushboo Vashi <khushboo.vashi@ente= rprisedb.com> wrote:
Hi,

Please find the a= ttached patch to fix RM #2963:=C2=A0Backup database, Restore database and M= aintenance Database failed for =C3=A9 object.
=
With the patch applied, I get:

2018-01-03 15:23:00,110: INFO pgadmin: Executing the proces= s executor with the arguments: ['/Users/dpage/.virtualenvs/pgadmin= 4/bin/python', '/Users/dpage/git/pgadmin4/web/pgadmin/misc/bgp= rocess/process_executor.py', '/usr/local/pgsql/bin/pg_dump'= ;, u'--file', u'/Users/dpage/e.sql', u'--host'= , u'localhost', u'--port', '5432', u'--username= ', u'postgres', u'--no-password', u'--verbose',= u'--format=3Dc', u'--blobs', u'\xe9']
20= 18-01-03 15:23:00,117: INFO wer= kzeug: 127.0.0.1 - - [03/Jan/20= 18 15:23:00] "POST /backup/job/1/object HTTP/1.1" 200 -
Exception in thread Thread-6:
Traceback (most recent call last):=
=C2=A0 File "/System/Library/Frameworks/Python.framewo= rk/Versions/2.7/lib/python2.7/threading.py", line 810, in __boots= trap_inner
=C2=A0 =C2=A0 self.run()
=C2=A0 File "/= System/Library/Frameworks/Python.framework/Versions/2.7/lib/pytho= n2.7/threading.py", line 763, in run
=C2=A0 =C2=A0 self.__ta= rget(*self.__args, **self.__kwargs)
=C2=A0 File "/System/Lib= rary/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Socke= tServer.py", line 602, in process_request_thread
=C2=A0= =C2=A0 self.handle_error(request, client_address)
=C2=A0 File &q= uot;/System/Library/Frameworks/Python.framework/Versions/2.7/lib/= python2.7/SocketServer.py", line 599, in process_request_thread
=C2=A0 =C2=A0 self.finish_request(request, client_address)
=C2=A0 File "/System/Library/Frameworks/Python.framework/Versi= ons/2.7/lib/python2.7/SocketServer.py", line 334, in finish_= request
=C2=A0 =C2=A0 self.RequestHandlerClass(request, clie= nt_address, self)
=C2=A0 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 655, in __init__
=C2=A0 =C2=A0 self.handle()
= =C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/sit= e-packages/werkzeug/serving.py", line 200, in handle
= =C2=A0 =C2=A0 rv =3D BaseHTTPRequestHandler.handle(self)
=C2= =A0 File "/System/Library/Frameworks/Python.framework/Versions/2.= 7/lib/python2.7/BaseHTTPServer.py", line 340, in handle
=C2=A0 =C2=A0 self.handle_one_request()
=C2=A0 File "/= Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/wer= kzeug/serving.py", line 235, in handle_one_request
=C2=A0 = =C2=A0 return self.run_wsgi()
=C2=A0 File "/Users/dpage/.vir= tualenvs/pgadmin4/lib/python2.7/site-packages/werkzeug/serving.py= ", line 177, in run_wsgi
=C2=A0 =C2=A0 execute(self.server.a= pp)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib= /python2.7/site-packages/werkzeug/serving.py", line 165, in execu= te
=C2=A0 =C2=A0 application_iter =3D app(environ, start_response= )
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/p= ython2.7/site-packages/flask/app.py", line 2000, in __call__
=C2=A0 =C2=A0 return self.wsgi_app(environ, start_response)
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/si= te-packages/flask/app.py", line 1991, in wsgi_app
=C2= =A0 =C2=A0 response =3D self.make_response(self.handle_exception(e))
=C2=A0 File "/Users/dpage/.virtualenvs/pgadmin4/lib/pyth= on2.7/site-packages/flask/app.py", line 1567, in handle_exception=
=C2=A0 =C2=A0 reraise(exc_type, exc_value, tb)
=C2=A0 = File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-= packages/flask/app.py", line 1988, in wsgi_app
=C2=A0 =C2=A0= response =3D self.full_dispatch_request()
=C2=A0 File "/Use= rs/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/= app.py", line 1641, in full_dispatch_request
=C2=A0 =C2=A0 r= v =3D self.handle_user_exception(e)
=C2=A0 File "/Users/dpag= e/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py&= quot;, line 1544, in handle_user_exception
=C2=A0 =C2=A0 reraise(= exc_type, exc_value, tb)
=C2=A0 File "/Users/dpage/.virtuale= nvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line= 1639, in full_dispatch_request
=C2=A0 =C2=A0 rv =3D self.dispatc= h_request()
=C2=A0 File "/Users/dpage/.virtualenvs/pgad= min4/lib/python2.7/site-packages/flask/app.py", line 1625, in dis= patch_request
=C2=A0 =C2=A0 return self.view_functions[rule.= endpoint](**req.view_args)
=C2=A0 File "/Users/dpage/.virtua= lenvs/pgadmin4/lib/python2.7/site-packages/flask_login.py", = line 792, in decorated_view
=C2=A0 =C2=A0 return func(*args, **kw= args)
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmi= n/misc/bgprocess/__init__.py", line 62, in index
=C2=A0= =C2=A0 return make_response(response=3DBatchProcess.list())
=C2=A0 File "/Users/dpage/git/pgadmin4/web/pgadmin/misc/bgproces= s/processes.py", line 512, in list
=C2=A0 =C2=A0 desc = =3D loads(p.desc)
=C2=A0 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1= 381, in loads
=C2=A0 =C2=A0 file =3D StringIO(str)
Unic= odeEncodeError: 'ascii' codec can't encode character u'\uff= fd' in position 138: ordinal not in range(128)=C2=A0

Fixed. Please find the attached updated patch.=C2= =A0
--
Dav= e Page
Blog: h= ttp://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK:= http://www.enter= prisedb.com
The Enterprise PostgreSQL Company

--001a113d7502b477e505626691bf-- --001a113d7502b477e905626691c1 Content-Type: text/x-patch; charset="US-ASCII"; name="RM_2963_ver1.patch" Content-Disposition: attachment; filename="RM_2963_ver1.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_jc8prje40 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL21pc2MvYmdwcm9jZXNzL3Byb2Nlc3Nlcy5weSBiL3dl Yi9wZ2FkbWluL21pc2MvYmdwcm9jZXNzL3Byb2Nlc3Nlcy5weQppbmRleCAzOWJiOGUzLi4zZjIz YTk5IDEwMDY0NAotLS0gYS93ZWIvcGdhZG1pbi9taXNjL2JncHJvY2Vzcy9wcm9jZXNzZXMucHkK KysrIGIvd2ViL3BnYWRtaW4vbWlzYy9iZ3Byb2Nlc3MvcHJvY2Vzc2VzLnB5CkBAIC0xNjQsMTIg KzE2NCwxMyBAQCBjbGFzcyBCYXRjaFByb2Nlc3Mob2JqZWN0KToKICAgICAgICAgICAgIGNzdl93 cml0ZXIud3JpdGVyb3coX2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cnJlbnRfdGlt ZSgpKQogCiAgICAgICAgICAgICBleGVjdXRpb25fdGltZSA9IChldGltZSAtIHN0aW1lKS50b3Rh bF9zZWNvbmRzKCkKKyAgICAgICAgICAgIHAuZGVzYyA9IHAuZGVzYy5lbmNvZGUoJ3V0Zi04Jywg J2lnbm9yZScpIGlmIElTX1BZMiBhbmQgaGFzYXR0cihwLmRlc2MsICdkZWNvZGUnKSBlbHNlIHAu ZGVzYwogICAgICAgICAgICAgZGVzYyA9IGxvYWRzKHAuZGVzYykKICAgICAgICAgICAgIGRldGFp bHMgPSBkZXNjCiAK --001a113d7502b477e905626691c1--