>>> import logging
>>> logging.getLogger
<function getLogger at 0x101de4ed8>
On Friday, October 6, 2017 at 3:26:14 PM UTC-7, Omi Chiba wrote:
Help!I was running old version (2015) of web2py on my hosting server as our company's portal site and it stopped working suddenly. It's Windows 2012 server with Uniserver(Apache). Apache start fine but shows error message.
[...]
AttributeError: 'module' object has no attribute 'getLogger'
The logging module is standard python for 2.7 and earlier ... what version of python are you using, and has that changed recently?
import logging
dir(logging)
The file in question no longer exists. It has been moved to a subfolder long ago.
The error you are getting makes no sense sincepython>>> import logging
>>> logging.getLogger
<function getLogger at 0x101de4ed8>
that is a function from the python module logging, and not a web2py function.to diagnose this it is important to understand:which python version?what has changed?
I have C:\Python27 in my "Path" System variables and I can run the pyson module (*.py) from command prompt.
import logging
dir(logging)
>> dir(logging)
['BASIC_FORMAT', 'BufferingFormatter', 'CRITICAL', 'DEBUG', 'ERROR', 'FATAL', 'FileHandler', 'Filter', 'Filterer', 'Formatter', 'Handler', 'INFO', 'LogRecord', 'Logger', 'LoggerAdapter', 'Manager', 'NOTSET', 'NullHandler', 'PlaceHolder', 'RootLogger', 'StreamHandler', 'WARN', 'WARNING', '__all__', '__author__', '__builtins__', '__date__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__status__', '__version__', '_acquireLock', '_addHandlerRef', '_checkLevel', '_defaultFormatter', '_handlerList', '_handlers', '_levelNames', '_lock', '_loggerClass', '_releaseLock', '_removeHandlerRef', '_showwarning', '_srcfile', '_startTime', '_unicode', '_warnings_showwarning', 'addLevelName', 'atexit', 'basicConfig', 'cStringIO', 'captureWarnings', 'codecs', 'critical', 'currentframe', 'debug', 'disable', 'error', 'exception', 'fatal', 'getLevelName', 'getLogger', 'getLoggerClass', 'info', 'log', 'logMultiprocessing', 'logProcesses', 'logThreads', 'makeLogRecord', 'os', 'raiseExceptions', 'root', 'setLoggerClass', 'shutdown', 'sys', 'thread', 'threading', 'time', 'traceback', 'warn', 'warning', 'warnings', 'weakref']
>>>
Really????
Do you think I should uninstall and reinstall the same version of python?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/6vmk64T1810/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Python 2.7.13 |Anaconda 2.2.0 (x86_64)| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import logging
>>> import platform
>>> logger = logging.getLogger("web2py")
--
--