I am writing a script that uses a logging module to handle script details. I am using the PyDev plugin for Eclipse and am running Python 3.2. If I "Run" the script everything works fine, but if I "debug" the script, I get the following error:
Traceback (most recent call last): File "C:\Program Files (x86)\Eclipse\eclipse\plugins\org.python.pydev_3.2.0.201312292215\pysrc\pydevd.py", line 1146, in trace_dispatch filename, base = GetFilenameAndBase(frame) File "C:\Program Files (x86)\Eclipse\eclipse\plugins\org.python.pydev_3.2.0.201312292215\pysrc\pydevd_file_utils.py", line 224, in GetFilenameAndBase return NORM_FILENAME_AND_BASE_CONTAINER[f] TypeError: 'NoneType' object is not subscriptable
I couldn’t understand where the error came from, so I started commenting on everything and found out that “importing the log” was causing the error. Here is the code I'm running:
import logging def main(): print("Logging import test") if __name__ == '__main__': main()
I checked that the registration module was with all the other standard modules in my Python32 installation location. Any ideas? Again, this is only when I run PyDev in debug mode; Startup completes without error. Thanks!
source share