Closed sadow984 closed 4 years ago
Interesting, but we'll need a reproducible example.
On Tue, Dec 3, 2019, 08:49 sadow984 notifications@github.com wrote:
@pysnooper.snoop() AttributeError: partially initialized module 'pysnooper' has no attribute 'snoop' (most likely due to a circular import)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cool-RR/PySnooper/issues/173?email_source=notifications&email_token=AAAN3SWA3UIIP6AZDSBSQT3QWX6OFA5CNFSM4JUS5NR2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H5SCUWA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN3SW4UBB4BQQZN25R4ZLQWX6OFANCNFSM4JUS5NRQ .
Did you name your file pysnooper.py
?
Did you name your file
pysnooper.py
?
yes
Interesting, but we'll need a reproducible example. … On Tue, Dec 3, 2019, 08:49 sadow984 @.***> wrote: @pysnooper.snoop() AttributeError: partially initialized module 'pysnooper' has no attribute 'snoop' (most likely due to a circular import) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#173?email_source=notifications&email_token=AAAN3SWA3UIIP6AZDSBSQT3QWX6OFA5CNFSM4JUS5NR2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H5SCUWA>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAN3SW4UBB4BQQZN25R4ZLQWX6OFANCNFSM4JUS5NRQ .
import pysnooper
@pysnooper.snoop() def number_to_bits(number): if number: bits = [] while number: number, remainder = divmod(number, 2) bits.insert(0, remainder) return bits else: return [0]
number_to_bits(6)
Good catch Alex. Yeah, you definitely can't name your file pysnooper.py
.
ok,got it
thanks
@pysnooper.snoop() AttributeError: partially initialized module 'pysnooper' has no attribute 'snoop' (most likely due to a circular import)