-1

I am using a script that an old coworker wrote.

He was using the logging module to print out to standard output.

(Specifically, he created a logger using logging.getLogger() and then would logger.info("some message"))

I swapped this out for print (I intend to add logging back later).

Now, when I run code, I get this error. NameError: name 'logger' is not defined

I removed __pycache__ but I'm still experiencing the error.

openwonk
  • 14,023
  • 7
  • 43
  • 39
  • Show us all relevant code and the full error traceback. – Klaus D. Jul 15 '19 at 07:10
  • check what line the error is in, there should be a 'logger' reference there – Avishay Cohen Jul 15 '19 at 07:13
  • code is quite long, hard to just show one snippet. I'll try. also, points to file that exists but line number has completely different code in now. – openwonk Jul 15 '19 at 07:14
  • FYI, running new installation of Anaconda 3.7 distribution on new Mac. – openwonk Jul 15 '19 at 07:15
  • Found that issue is Anaconda distribution and how it (the specific distribution) caches changes to a file. https://stackoverflow.com/questions/45664942/anaconda-keeps-caching-modules – openwonk Jul 15 '19 at 08:16
  • 1
    Possible duplicate of [Anaconda keeps caching modules](https://stackoverflow.com/questions/45664942/anaconda-keeps-caching-modules) – openwonk Jul 15 '19 at 09:04

1 Answers1

0

Issue is Anaconda distribution and how it (the specific distribution) caches changes to a file.

See here. Closing question.

openwonk
  • 14,023
  • 7
  • 43
  • 39