[nvda-addons] Re: Question: Possible issue on this add-on or in add-on manager

  • From: Noelia <nrm1977@xxxxxxxxx>
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Sun, 17 Apr 2016 01:36:35 +0200

Hi James and Joseph, thanks both.

I read your opinions and code and I learn a lot with you.

I use except: pass in all of installTasks for other add-ons. I don't know if it is right, and this is the first add-on which gives me this problem.

I hav got this in the log.


***

Python warning:
C:\Program Files (x86)\NVDA\library.zip\configobj.py:28: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.
DEBUGWARNING - Python warning (01:30:34):
C:\Program Files (x86)\NVDA\library.zip\gui\addonGui.py:20: DeprecationWarning: object() takes no parameters
DEBUGWARNING - Python warning (01:30:35):
C:\Users\User\AppData\Roaming\nvda\addons\reportPasswords.pendingInstall\installTasks.py:1: RuntimeWarning: Parent module 'addons.reportPasswords' not found while handling absolute import
DEBUGWARNING - Python warning (01:30:35):
C:\Users\User\AppData\Roaming\nvda\addons\reportPasswords.pendingInstall\installTasks.py:2: RuntimeWarning: Parent module 'addons.reportPasswords' not found while handling absolute import
DEBUGWARNING - Python warning (01:30:35):
C:\Users\User\AppData\Roaming\nvda\addons\reportPasswords.pendingInstall\installTasks.py:3: RuntimeWarning: Parent module 'addons.reportPasswords' not found while handling absolute import
DEBUGWARNING - Python warning (01:30:35):
C:\Users\User\AppData\Roaming\nvda\addons\reportPasswords.pendingInstall\installTasks.py:4: RuntimeWarning: Parent module 'addons.reportPasswords' not found while handling absolute import
DEBUGWARNING - Python warning (01:30:35):
C:\Users\User\AppData\Roaming\nvda\addons\reportPasswords.pendingInstall\installTasks.py:5: RuntimeWarning: Parent module 'addons.reportPasswords' not found while handling absolute import
DEBUGWARNING - Python warning (01:30:35):
C:\Users\User\AppData\Roaming\nvda\addons\reportPasswords.pendingInstall\installTasks.py:6: RuntimeWarning: Parent module 'addons.reportPasswords' not found while handling absolute import
DEBUGWARNING - RPC process 2088 (nvda_slave.exe) (01:33:01):
Python warning:
C:\Program Files (x86)\NVDA\library.zip\configobj.py:28: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.



El 17/04/2016 a las 1:22, Joseph Lee escribió:

Hi,
As a temporary workaround, log whatever exception is thrown (raise), then once 
you figure out what's what (likely OS error), tell users that file copying has 
failed like:
Try:
        Shutil.copy(source, target)
Except whateverException:
        Raise()
This will force add-on handler to give up.
Cheers,
Joseph

-----Original Message-----
From: nvda-addons-bounce@xxxxxxxxxxxxx 
[mailto:nvda-addons-bounce@xxxxxxxxxxxxx] On Behalf Of James Scholes
Sent: Saturday, April 16, 2016 4:17 PM
To: nvda-addons@xxxxxxxxxxxxx
Subject: [nvda-addons] Re: Question: Possible issue on this add-on or in add-on 
manager

Noelia wrote:
I don't know when it happens and I can't see nothing in the log.
This is why you can't see anything in the log:

                                try:
                                        
shutil.copy(os.path.join(globalVars.appArgs.configPath,
"reportPasswords.ini"), os.path.join(os.path.dirname(__file__),
"globalPlugins"))
                                except:
                                        pass

You're silencing any exceptions that do occur.  So if the copy operation is 
failing due to previously-opened file handles that weren't disposed of properly 
for example, you'll never see that error.
--
James Scholes
http://twitter.com/JamesScholes
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.

Community addons are available from: http://addons.nvda-project.org To send a ;
message to the list: nvda-addons@xxxxxxxxxxxxx To change your list 
settings/unsubscribe: //www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe: 
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.
Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe: 
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx

Other related posts: