ncdingari / r-orange

Automatically exported from code.google.com/p/r-orange
Other
0 stars 0 forks source link

redREnviron settings not set #486

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Lots of errors on starting RedR because settings are not set.

REDRCORE:INFO : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\redRObjects.py", line 
52, in readCategories _widgetRegistry = orngRegistry.readCategories() || 
Loading repository of packages.
Compiling 
C:\Python26\Lib\site-packages\RedRWorkingTrunk\libraries\base\qtWidgets\pyDataTa
ble.py ...
Sorry: IndentationError: ('expected an indented block', 
('C:\\Python26\\Lib\\site-packages\\RedRWorkingTrunk\\libraries\\base\\qtWidgets
\\pyDataTable.py', 99, 7, '    def resizeColumnsToContents(self):\n'))
REDRCORE:ERROR : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || Exception occurred in 
C:\Python26\Lib\site-packages\RedRWorkingTrunk\libraries\base\widgets\dataEntry.
py: expected an indented block (pyDataTable.py, line 99)
REDRCORE:DEBUG : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || 

############################################################
Unhandled exception of type IndentationError occured at 2011-02-08 
15:39:01.408000:
Traceback:
  File: orngRegistry.py, line 214 in readWidgets
  Code: wmod = imp.load_source(package['Name'] + '_' + widgetName, filename)
    File: dataEntry.py, line 11 in <module>
    Code: from libraries.base.qtWidgets.pyDataTable import pyDataTable as pyDataTable
      File "C:\Python26\Lib\site-packages\RedRWorkingTrunk\libraries\base\qtWidgets\pyDataTable.py", line 99 
      def resizeColumnsToContents(self): 
      ^ 
      IndentationError: expected an indented block 
############################################################

REDRCORE:ERROR : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || Exception occurred in 
C:\Python26\Lib\site-packages\RedRWorkingTrunk\libraries\imageLibrary\widgets\co
localization.py: 'module' object has no attribute 'settings'
REDRCORE:DEBUG : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || 

############################################################
Unhandled exception of type AttributeError occured at 2011-02-08 
15:39:01.724000:
Traceback:
  File: orngRegistry.py, line 214 in readWidgets
  Code: wmod = imp.load_source(package['Name'] + '_' + widgetName, filename)
    File: colocalization.py, line 13 in <module>
    Code: from libraries.imageLibrary.signalClasses.ImageSignal import ImageSignal as imsig
      File: ImageSignal.py, line 1 in <module>
      Code: from canvas.signals import BaseRedRVariable
        File: signals.py, line 5 in <module>
        Code: import redRLog
          File: redRLog.py, line 233 in <module>
          Code: fileLogger = LogHandler()
            File: redRLog.py, line 168 in __init__
            Code: self.clearOldLogs()
              File: redRLog.py, line 200 in clearOldLogs
              Code: for f in glob.glob(redREnviron.settings['logsDir']+'/*.html'):
                AttributeError: 'module' object has no attribute 'settings' 
############################################################

REDRCORE:ERROR : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || Exception occurred in 
C:\Python26\Lib\site-packages\RedRWorkingTrunk\libraries\imageLibrary\widgets\fi
lterPixels.py: 'module' object has no attribute 'settings'
REDRCORE:DEBUG : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || 

############################################################
Unhandled exception of type AttributeError occured at 2011-02-08 
15:39:01.731000:
Traceback:
  File: orngRegistry.py, line 214 in readWidgets
  Code: wmod = imp.load_source(package['Name'] + '_' + widgetName, filename)
    File: filterPixels.py, line 13 in <module>
    Code: from libraries.imageLibrary.signalClasses.ImageSignal import ImageSignal as imsig
      File: ImageSignal.py, line 1 in <module>
      Code: from canvas.signals import BaseRedRVariable
        File: signals.py, line 5 in <module>
        Code: import redRLog
          File: redRLog.py, line 233 in <module>
          Code: fileLogger = LogHandler()
            File: redRLog.py, line 168 in __init__
            Code: self.clearOldLogs()
              File: redRLog.py, line 200 in clearOldLogs
              Code: for f in glob.glob(redREnviron.settings['logsDir']+'/*.html'):
                AttributeError: 'module' object has no attribute 'settings' 
############################################################

REDRCORE:ERROR : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || Exception occurred in 
C:\Python26\Lib\site-packages\RedRWorkingTrunk\libraries\imageLibrary\widgets\im
ageSplit.py: 'module' object has no attribute 'settings'
REDRCORE:DEBUG : File 
"C:\Python26\Lib\site-packages\RedRWorkingTrunk\canvas\orngRegistry.py", line 
73, in readCategories widgets = readWidgets(os.path.join(directory), package) 
## calls an internal function || 

############################################################
Unhandled exception of type AttributeError occured at 2011-02-08 
15:39:01.738000:
Traceback:
  File: orngRegistry.py, line 214 in readWidgets
  Code: wmod = imp.load_source(package['Name'] + '_' + widgetName, filename)
    File: imageSplit.py, line 13 in <module>
    Code: from libraries.imageLibrary.signalClasses.ImageSignal import ImageSignal as imsig
      File: ImageSignal.py, line 1 in <module>
      Code: from canvas.signals import BaseRedRVariable
        File: signals.py, line 5 in <module>
        Code: import redRLog
          File: redRLog.py, line 233 in <module>
          Code: fileLogger = LogHandler()
            File: redRLog.py, line 168 in __init__
            Code: self.clearOldLogs()
              File: redRLog.py, line 200 in clearOldLogs
              Code: for f in glob.glob(redREnviron.settings['logsDir']+'/*.html'):
                AttributeError: 'module' object has no attribute 'settings' 
############################################################

Original issue reported on code.google.com by kylecovi...@gmail.com on 8 Feb 2011 at 9:43

GoogleCodeExporter commented 8 years ago
try deleting your APPDATA/redr dir

Original comment by anup.parikh on 8 Feb 2011 at 9:49

GoogleCodeExporter commented 8 years ago
deleted now getting this on clearing logs

REDRCORE:WARNING : 

############################################################
Unhandled exception of type AttributeError occured at 2011-02-08 
17:18:52.750000:
Traceback:
  File: signals.py, line 109 in registerRedRSignals
  Code: c = forname('libraries.%s.signalClasses.%s' % (package,signalClass),signalClass)
    File: signals.py, line 122 in forname
    Code: module = __import__(modname, globals(), locals(),classname)
      File: ImageSignal.py, line 1 in <module>
      Code: from canvas.signals import BaseRedRVariable
        File: signals.py, line 5 in <module>
        Code: import redRLog
          File: redRLog.py, line 233 in <module>
          Code: fileLogger = LogHandler()
            File: redRLog.py, line 168 in __init__
            Code: self.clearOldLogs()
              File: redRLog.py, line 200 in clearOldLogs
              Code: for f in glob.glob(redREnviron.settings['logsDir']+'/*.html'):
                AttributeError: 'module' object has no attribute 'settings' 
############################################################

Original comment by kylecovi...@gmail.com on 8 Feb 2011 at 11:24

GoogleCodeExporter commented 8 years ago
on close and reopen the same error of none type object for redREnviron.

Original comment by kylecovi...@gmail.com on 8 Feb 2011 at 11:58

GoogleCodeExporter commented 8 years ago
that odd. I cannot reproduce the error. have you updated to latest revision?

Original comment by anup.parikh on 9 Feb 2011 at 12:34

GoogleCodeExporter commented 8 years ago
just updated and getting the error

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Kyle R Covington>cd C:/Python26/lib/site*/redrtr*/can*

C:\Python26\Lib\site-packages\RedRTrunk\canvas>python red-RCanvas.pyw
Error in sys.excepthook:
Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\RedRTrunk\canvas\redRLog.py", line 227, in
 exceptionHandler
    log(REDRCORE,CRITICAL,formatException(type,value,tracebackInfo))
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "red-RCanvas.pyw", line 464, in <module>
    sys.exit(main())
  File "red-RCanvas.pyw", line 445, in main
    dlg = OrangeCanvasDlg(app)
  File "red-RCanvas.pyw", line 216, in __init__
    print self.restoreState(redREnviron.settings['windowState'])
  File "C:\Python26\Lib\site-packages\RedRTrunk\canvas\redRLog.py", line 221, in
 write
    if logLevels[redREnviron.settings['outputVerbosity']] != DEVEL:
AttributeError: 'NoneType' object has no attribute 'settings'

C:\Python26\Lib\site-packages\RedRTrunk\canvas>

Original comment by kylecovi...@gmail.com on 9 Feb 2011 at 2:08

GoogleCodeExporter commented 8 years ago
I printed the __name__ and the directoryNames and settings on load of 
redREnviron, getting the following

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Kyle R Covington>cd C:/Python26/lib/site*/redrtr*/can*

C:\Python26\Lib\site-packages\RedRTrunk\canvas>python red-RCanvas.pyw
Error in sys.excepthook:
Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\RedRTrunk\canvas\redRLog.py", line 227, in
 exceptionHandler
    log(REDRCORE,CRITICAL,formatException(type,value,tracebackInfo))
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "red-RCanvas.pyw", line 464, in <module>
    sys.exit(main())
  File "red-RCanvas.pyw", line 445, in main
    dlg = OrangeCanvasDlg(app)
  File "red-RCanvas.pyw", line 216, in __init__
    print self.restoreState(redREnviron.settings['windowState'])
  File "C:\Python26\Lib\site-packages\RedRTrunk\canvas\redRLog.py", line 221, in
 write
    if logLevels[redREnviron.settings['outputVerbosity']] != DEVEL:
AttributeError: 'NoneType' object has no attribute 'settings'

C:\Python26\Lib\site-packages\RedRTrunk\canvas>python red-RCanvas.pyw
redREnviron This is the redREnviron name
{'logsDir': 'C:\\Users\\Kyle R Covington\\AppData\\Roaming\\red-r\\RedRlogs', 'r
eportsDir': 'C:\\Users\\Kyle R Covington\\AppData\\Roaming\\red-r\\RedRReports',
 'picsDir': 'C:\\Python26\\Lib\\site-packages\\RedRTrunk\\libraries\\base\\icons
', 'canvasDir': 'C:\\Python26\\Lib\\site-packages\\RedRTrunk\\canvas', 'examples
Dir': 'C:\\Python26\\Lib\\site-packages\\RedRTrunk\\Examples', 'RDir': 'C:\\Pyth
on26\\Lib\\site-packages\\R\\R-2.11.1', 'osSpecific': 'C:\\Python26\\Lib\\site-p
ackages\\RedRTrunk\\win32', 'redRDir': 'C:\\Python26\\Lib\\site-packages\\RedRTr
unk', 'includes': 'C:\\Python26\\Lib\\site-packages\\RedRTrunk\\includes', 'down
loadsDir': 'C:\\Users\\Kyle R Covington\\AppData\\Roaming\\red-r\\downloads', 's
chemaDir': u'C:\\Users\\Kyle R Covington\\Documents\\Red-R\\Schemas', 'tempDir':
 u'C:\\Users\\Kyle R Covington\\AppData\\Roaming\\red-r\\RedRTemp\\temp_12972174
59.13', 'settingsDir': 'C:\\Users\\Kyle R Covington\\AppData\\Roaming\\red-r', '
qtWidgetsDir': 'C:\\Python26\\Lib\\site-packages\\RedRTrunk\\libraries\\base\\qt
Widgets', 'tempDirHolder': 'C:\\Users\\Kyle R Covington\\AppData\\Roaming\\red-r
\\RedRTemp', 'widgetSettingsDir': 'C:\\Users\\Kyle R Covington\\AppData\\Roaming
\\red-r\\RedRWidgetSettings', 'templatesDir': u'C:\\Users\\Kyle R Covington\\Doc
uments\\Red-R\\Templates', 'libraryDir': 'C:\\Python26\\Lib\\site-packages\\RedR
Trunk\\libraries', 'canvasIconsDir': 'C:\\Python26\\Lib\\site-packages\\RedRTrun
k\\canvas\\icons', 'canvasSettingsDir': 'C:\\Users\\Kyle R Covington\\AppData\\R
oaming\\red-r\\RedRCanvas', 'widgetDir': 'C:\\Python26\\Lib\\site-packages\\RedR
Trunk\\libraries', 'RlibPath': 'C:/Python26/Lib/site-packages/R/R-2.11.1/library
', 'documentsDir': u'C:\\Users\\Kyle R Covington\\Documents', 'redRSignalsDir':
'C:\\Python26\\Lib\\site-packages\\RedRTrunk\\libraries\\base\\signalClasses'}
{'schemeIconSize': 2, 'synchronizeHelp': 1, 'focusOnCatchOutput': 0, 'snapToGrid
': False, 'saveSchemaDir': u'C:\\Users\\Kyle R Covington\\Documents', 'printExce
ptionInStatusBar': 0, 'owInfo': 1, 'pos': PyQt4.QtCore.QPoint(62, 2), 'keepForXD
ays': 7, 'CRANrepos': u'http://cran.sixsigmaonline.org/', 'outputVerbosity': 3,
'dockState': {'widgetBox': True, 'notesBox': True, 'outputBox': True}, 'uploadEr
ror': False, 'id': u'1297217459.13', 'toolboxWidth': 200, 'style': u'WindowsVist
a', 'owShow': 0, 'availablelanguages': OrderedDict([('en_EN.ISO8859-1', u'Englis
h'), ('fr_FR.ISO8859-1', u'Fran\xe7aise'), ('de_DE.ISO8859-1', u'Deutsch'), ('la
tin', 'Latin')]), 'dontAskBeforeClose': 0, 'canvasWidth': 900, 'printOutputInSta
tusBar': 0, 'minSeverity': 5, 'size': PyQt4.QtCore.QSize(900, 574), 'email': u'k
yle@red-r.org', 'checkedForUpdates': 0, 'useDefaultPalette': 0, 'logsDir': 'C:\\
Users\\Kyle R Covington\\AppData\\Roaming\\red-r\\RedRlogs', 'firstLoad': 1, 'ca
nContact': 1, 'askToUploadError': False, 'iconSize': '40 x 40', 'canvasHeight':
700, 'ocWarning': 1, 'ocInfo': 1, 'WidgetTabs': [], 'ocError': 1, 'focusOnCatchE
xception': True, 'showSignalNames': 1, 'exceptionLevel': 5, 'ocShow': 1, 'displa
yTraceback': 0, 'language': OrderedDict([('en_EN.ISO8859-1', u'English'), ('fr_F
R.ISO8859-1', u'Fran\xe7aise'), ('de_DE.ISO8859-1', u'Deutsch'), ('latin', 'Lati
n')]), 'writeLogFile': 1, 'widgetXML': <xml.dom.minidom.Document instance at 0x0
1670878>, 'widgetListType': 3, 'red-RPackagesUpdated': 0, 'owWarning': 1, 'windo
wState': PyQt4.QtCore.QByteArray('\x00\x00\x00\xff\x00\x00\x00\x00\xfd\x00\x00\x
00\x03\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01m\xfc\x02\x00\x00\x00\x01\xfb\
x00\x00\x00\x14\x00w\x00i\x00d\x00g\x00e\x00t\x00D\x00o\x00c\x00k\x01\x00\x00\x0
08\x00\x00\x01m\x00\x00\x00]\x00\xff\xff\xff\x00\x00\x00\x01\x00\x00\x00\xc8\x00
\x00\x01m\xfc\x02\x00\x00\x00\x01\xfb\x00\x00\x00\x16\x00C\x00a\x00n\x00v\x00a\x
00s\x00N\x00o\x00t\x00e\x00s\x01\x00\x00\x008\x00\x00\x01m\x00\x00\x00]\x00\xff\
xff\xff\x00\x00\x00\x03\x00\x00\x03\x84\x00\x00\x00x\xfc\x01\x00\x00\x00\x01\xfb
\x00\x00\x00\x18\x00C\x00a\x00n\x00v\x00a\x00s\x00O\x00u\x00t\x00p\x00u\x00t\x01
\x00\x00\x00\x00\x00\x00\x03\x84\x00\x00\x00\xf5\x00\xff\xff\xff\x00\x00\x01\xb4
\x00\x00\x01m\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x08\x00\x00\x00\x08\xf
c\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x1a\x00c\x00a\x00n
\x00v\x00a\x00s\x00T\x00o\x00o\x00l\x00b\x00a\x00r\x01\x00\x00\x00\x00\xff\xff\x
ff\xff\x00\x00\x00\x00\x00\x00\x00\x00'), 'geometry': PyQt4.QtCore.QByteArray('\
x01\xd9\xd0\xcb\x00\x01\x00\x00\x00\x00\x00>\x00\x00\x00\x02\x00\x00\x03\xd1\x00
\x00\x02e\x00\x00\x00F\x00\x00\x00 \x00\x00\x03\xc9\x00\x00\x02]\x00\x00\x00\x00
\x00\x00'), 'saveWidgetsPosition': 1, 'saveApplicationDir': 'C:\\Users\\Kyle R C
ovington\\AppData\\Roaming\\red-r\\RedRCanvas', 'logFile': u'C:\\Users\\Kyle R C
ovington\\AppData\\Roaming\\red-r\\RedRlogs\\outputLog_1297141779.57.html', 'hel
pMode': True, 'toolbarIconSize': 1, 'owError': 1}
Error in sys.excepthook:
Traceback (most recent call last):
  File "C:\Python26\Lib\site-packages\RedRTrunk\canvas\redRLog.py", line 227, in
 exceptionHandler
    log(REDRCORE,CRITICAL,formatException(type,value,tracebackInfo))
TypeError: 'NoneType' object is not callable

Original exception was:
Traceback (most recent call last):
  File "red-RCanvas.pyw", line 464, in <module>
    sys.exit(main())
  File "red-RCanvas.pyw", line 445, in main
    dlg = OrangeCanvasDlg(app)
  File "red-RCanvas.pyw", line 216, in __init__
    print self.restoreState(redREnviron.settings['windowState'])
  File "C:\Python26\Lib\site-packages\RedRTrunk\canvas\redRLog.py", line 221, in
 write
    if logLevels[redREnviron.settings['outputVerbosity']] != DEVEL:
AttributeError: 'NoneType' object has no attribute 'settings'

C:\Python26\Lib\site-packages\RedRTrunk\canvas>

Original comment by kylecovi...@gmail.com on 9 Feb 2011 at 2:19

GoogleCodeExporter commented 8 years ago
I have deleted my APPDATA dir. downloaded a fresh version of the trunk(r1208).
still cannot reproduce the error. 

Original comment by anup.parikh on 9 Feb 2011 at 6:03

GoogleCodeExporter commented 8 years ago
Did the same and now the error is not appearing.  I had to restart several 
times though to have this take effect.

What is the purpose of if __name__ == 'redREnviron' ?  if everything needs 
these settings why shield it in an if statement?

Original comment by kylecovi...@gmail.com on 9 Feb 2011 at 3:51

GoogleCodeExporter commented 8 years ago
Without it redrinenviron was being loaded multiple times. Causing
multiple log files to be created for each session.

Original comment by anup.parikh on 9 Feb 2011 at 4:31

GoogleCodeExporter commented 8 years ago

Original comment by anup.parikh on 9 Feb 2011 at 7:31

GoogleCodeExporter commented 8 years ago

Original comment by anup.parikh on 9 Feb 2011 at 7:44