Re: [AMBER] Minor bug with updating Amber/AmberTools with Python3

From: Hai Nguyen <nhai.qn.gmail.com>
Date: Thu, 20 Apr 2017 16:57:28 -0400

Hi, this is indeed a bug. I saw this before. Thanks for your report.

Hai

On Thu, Apr 20, 2017 at 4:52 PM, Rohith Mohan <rmoha004.ucr.edu> wrote:
> Hello all,
>
> I ran into these two bugs while configuring my Amber16 installation and
> upgrading AmberTools16 to AmberTools17. The bugs seem to be due to the
> differences in behavior of two functions in Python3 but it was a quick fix
> in my case:
>
> In line 95 of $AMBERHOME/updateutils/upgrade.py,
> "msgtext = msg.read()" needs to be changed to "msgtext =
> msg.read().decode('utf-8')"
>
> In line 385 of $AMBERHOME/updateutils/main.py,
> "return raw_input(message.strip() + ' ')" needs to be changed to "return
> input(message.strip() + ' ')"
>
> I didn't see any other mentions of this issue in the archive so I figured
> I'd let the Amber users know in case they were looking for a solution. I've
> also included the corresponding errors that I encountered below.
>
> Thanks,
> Rohith Mohan
>
> --------------------------
>
> Checking for updates...
> Checking for available patches online. This may take a few seconds...
> Traceback (most recent call last):
> File "./update_amber", line 23, in <module>
> app.mainloop()
> File "/opt/amber16/updateutils/main.py", line 479, in mainloop
> self.check_updates()
> File "/opt/amber16/updateutils/main.py", line 164, in check_updates
> self.upgrade.load_upgrade_info()
> File "/opt/amber16/updateutils/downloader.py", line 104, in new_fcn
> return fcn(*args, **kwargs)
> File "/opt/amber16/updateutils/upgrade.py", line 96, in load_upgrade_info
> self.message = msgre.findall(msgtext)[0].strip()
> TypeError: cannot use a string pattern on a bytes-like object
> Check for updates failed.
>
>
>
>
> You are about to perform a major upgrade. This is NOT reversible.
>
> Traceback (most recent call last):
> File "./update_amber", line 23, in <module>
> app.mainloop()
> File "/opt/amber16/updateutils/main.py", line 495, in mainloop
> self.large_upgrade()
> File "/opt/amber16/updateutils/main.py", line 43, in newfcn
> fcn(self, *args, **kwargs)
> File "/opt/amber16/updateutils/main.py", line 370, in large_upgrade
> answer = self.get_user_input('Do you wish to continue? (y/N) ').strip()
> File "/opt/amber16/updateutils/main.py", line 385, in get_user_input
> return raw_input(message.strip() + ' ')
> NameError: name 'raw_input' is not defined
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Apr 20 2017 - 14:00:03 PDT
Custom Search