cool-RR / PySnooper

Never use print for debugging again
MIT License
16.37k stars 951 forks source link

Frozen Implementation Fails #215

Closed diVineProportion closed 3 years ago

diVineProportion commented 3 years ago

when freezing with pyinstaller (single file) on windows a NameError: name 'copyright' is not defined appears. Not sure if this is an issue with hidden imports or hooks, but I wasn't able to get it to work with a simple

import snoop

@snoop
def counter(start, end):
    for i in range(start, end):
        print(i)

if __name__ == "__main__":
    counter(1, 1000)
cool-RR commented 3 years ago

I believe this belongs here: https://github.com/alexmojaki/snoop

alexmojaki commented 3 years ago

@diVineProportion I've just pushed a fix for this, upgrade to the latest version of cheap_repr which is where the error comes from. If that doesn't work, open an issue on https://github.com/alexmojaki/snoop or https://github.com/alexmojaki/cheap_repr.