Re: [AMBER] Error while upgrading to AmberTools 17

From: Chetna Tyagi <cheta231.gmail.com>
Date: Thu, 25 May 2017 13:15:11 +0200

Dear Hai,

Thanks for your input. I converted all update files using 2to3. But there
seems to be a problem in the main.py file after that. The code is pasted
below. After running it, a NameError occurs stating "name 'y' is not
defined". This y or N is an answer to "Do you wish to continue?". Any
answer results in an error. I am attaching the main.py file with this mail.
Please help me to find out what is wrong with it.


Thanks,
Chetna



 ._makes_changes
   def large_upgrade(self):
      """ Performs a large upgrade (e.g. Amber 12 -> Amber 13) """
      # Let's go ahead and get user-consent before upgrading
      if not self.upgrade.look_for_upgrade():
         self.output.write('No major upgrade available.\n')
         return
      self.output.write('You are about to perform a major upgrade. This is '
                        'NOT reversible.\n\n')

* answer = self.get_user_input('Do you wish to continue?
(y/N)').strip() if answer and answer[0].lower() == 'y':*
         self.upgrade.load_upgrade_info()
         self.upgrade.set_ambertools_patch(self.atools_remote,
                                           self.atools_unap, self.atools_ap)
         if self.has_amber:
            self.upgrade.set_amber_patch(self.amber_remote,
                                         self.amber_unap, self.amber_ap)
         self.upgrade.perform_upgrade()
      else:
         self.output.write('\nNOT upgrading... Quitting...\n')
         sys.exit(1)

   def get_user_input(self, message):
      """ Gets input from the user """
      return eval(input(message.strip() + ' '))

On Wed, May 24, 2017 at 3:03 PM, Hai Nguyen <nhai.qn.gmail.com> wrote:

> That is unforeseen incident.
>
> In general, you can use 2to3 to automatically o convert any py2 style to
> py3 style format.
>
> Otherwise, download fresh at17 tarfile from amber website helps too.
>
> Hopefully this won't happens in next release.
> Hai
>
> On Wed, May 24, 2017 at 6:30 AM Chetna Tyagi <cheta231.gmail.com> wrote:
>
> > Dear all,
> >
> > I get several errors while trying to upgrade AmberTools16 to
> AmberTools17.
> > I believe it is because of using a newer version of Python.
> >
> > An error in main.py was the name 'raw_input' is not defined. In Python3
> it
> > has been changed to 'input' and after making the change it worked. The
> next
> > error occurred in upgrade.py file. Is there a simpler way to upgrade
> > without getting such errors?
> >
> > I have python version 3.6.0 and Anaconda 4.3.1
> >
> > --
> > Best wishes
> > Chetna
> > _______________________________________________
> > 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
>



-- 
Best wishes
Chetna



_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Received on Thu May 25 2017 - 04:30:03 PDT
Custom Search