Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the error: type object 'datetime.datetime' has no attribute 'da… #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

haccks
Copy link

@haccks haccks commented Feb 17, 2017

Running probemon.py on Raspberry pi3 with Kali Linux as OS getting error:

root@kali:~# python probemon.py -i wlan1  
Traceback (most recent call last):
  File "probemon.py", line 99, in <module>
    main()
  File "probemon.py", line 96, in main
    sniff(iface=args.interface, prn=built_packet_cb, store=0)
  File "/usr/lib/python2.7/dist-packages/scapy/sendrecv.py", line 620, in sniff
    r = prn(p)
  File "probemon.py", line 37, in packet_callback
    log_time = datetime.datetime.now().isoformat()
 AttributeError: type object 'datetime.datetime' has no attribute 'datetime'` 

Error has been resolved by the suggested changes.

@alican
Copy link

alican commented Mar 13, 2017

you changed the import from "import datetime" to "from datetime import datetime" and you made the error yourself. this fix is not wrong but also not necessary.

@J1mX
Copy link

J1mX commented Sep 7, 2018

Shouldn't it just be "log_time = datetime.now().isoformat()" instead of "log_time = datetime.datetime.now().isoformat()" that is the edit I had to make to avoid this error.

@ghost
Copy link

ghost commented Mar 4, 2020

Shouldn't it just be "log_time = datetime.now().isoformat()" instead of "log_time = datetime.datetime.now().isoformat()" that is the edit I had to make to avoid this error.

How can I find the log_time ? so that then I can edit it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants