log2timeline / plaso

Super timeline all the things

Home Page:https://plaso.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"AttributeError: module 'main': Windows 11 and Python 3.10.11

dafneb opened this issue · comments

Everytime I tried run any of tool without argument "--single-process" I get error "AttributeError: module 'main' has no attribute 'spec'. Did you mean: 'doc'?"

Problem was fixed with simple adjusting of scripts:

  • image_export.py
  • log2timeline.py
  • pinfo.py
  • psort.py
  • psteal.py
if __name__ == '__main__':
  # For PyInstaller sake we need to define this directly after "__main__".
  # https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing
  __spec__ = None
  multiprocessing.freeze_support()

  if not Main():
    sys.exit(1)
  else:
    sys.exit(0)

@dafneb can you provide more context about your installation method and platform? This issue has not surfaced in neither the CI tests or the Docker builds.

Maybe problem is with installation, it's my first experience with Python ...

Okay, I have got FlareVM based on Win11 22H2. I downloaded last release of log2timeline (plaso-20230717).
Then I run these commands:

pip install -r requirements.txt
python setup.py build
python setup.py install

And Python:
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32

Maybe problem is with installation, it's my first experience with Python ...

I strongly recommend sticking with the recommended installation methods: https://plaso.readthedocs.io/en/latest/sources/user/Users-Guide.html

You are running a non-recommended installation method, and I don't have the time to debug these.

I found this solution at another projects:

What solution? Are you running in a virtual env? are you invoking the right script?

Okay, my bad. I will install it at Linux.
Thank you very much for your reply.