[opensuse-packaging] Having a basic python issue - did Leap change something from 13.2?
All I'm not a python programmer, but I package several python apps. I'm trying to run log2timeline.py which I have packaged in security:forensics as part of the python-plaso package. The self tests all run. When I try to run the main app, it immediately fails: =====
log2timeline.py Traceback (most recent call last): File "/usr/bin/log2timeline.py", line 24, in <module> from plaso.frontend import log2timeline ImportError: cannot import name log2timeline
====== It should be giving me a syntax error since it requires arguments, but its not getting that far in the code. I've used it in the past, but it may have been a year or more under oS 13.2. This is with LEAP 42.2 It's obviously croaking on line 24. The first 30 lines of log2timeline.py are: ==================================
head -30 /usr/bin/log2timeline.py
#!/usr/bin/python # -*- coding: utf-8 -*- """The log2timeline command line tool.""" import argparse import logging import multiprocessing import sys import time import textwrap try: import win32console except ImportError: win32console = None from dfvfs.lib import definitions as dfvfs_definitions import plaso from plaso import dependencies from plaso.cli import extraction_tool from plaso.cli import tools as cli_tools from plaso.cli import views as cli_views from plaso.frontend import log2timeline from plaso.lib import definitions from plaso.lib import errors from plaso.lib import pfilter ===================================== Thanks for any insight. Thanks Greg -- Greg Freemyer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
hello, well, many things changed since 13.2 ;) but none that would seem relevant to this. On 15.2.2017 12:48, Greg Freemyer wrote:
log2timeline.py Traceback (most recent call last): File "/usr/bin/log2timeline.py", line 24, in <module> from plaso.frontend import log2timeline ImportError: cannot import name log2timeline
this is as plain as you can get: a module is missing. In particular, the file "%{python_sitelib}/plaso/frontend/log2timeline.py" does not exist. Looking at the spec for python-plaso, this just miiiight be because it's being deleted in the %install phase ;) hope this helps m.
====== It should be giving me a syntax error since it requires arguments, but its not getting that far in the code.
I've used it in the past, but it may have been a year or more under oS 13.2. This is with LEAP 42.2
It's obviously croaking on line 24. The first 30 lines of log2timeline.py are:
==================================
head -30 /usr/bin/log2timeline.py
#!/usr/bin/python # -*- coding: utf-8 -*- """The log2timeline command line tool."""
import argparse import logging import multiprocessing import sys import time import textwrap
try: import win32console except ImportError: win32console = None
from dfvfs.lib import definitions as dfvfs_definitions
import plaso from plaso import dependencies from plaso.cli import extraction_tool from plaso.cli import tools as cli_tools from plaso.cli import views as cli_views from plaso.frontend import log2timeline from plaso.lib import definitions from plaso.lib import errors from plaso.lib import pfilter
=====================================
Thanks for any insight.
Thanks Greg -- Greg Freemyer
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 15.2.2017 13:58, jan matejek wrote:
hello,
well, many things changed since 13.2 ;) but none that would seem relevant to this.
On 15.2.2017 12:48, Greg Freemyer wrote:
log2timeline.py Traceback (most recent call last): File "/usr/bin/log2timeline.py", line 24, in <module> from plaso.frontend import log2timeline ImportError: cannot import name log2timeline
this is as plain as you can get: a module is missing. In particular, the file "%{python_sitelib}/plaso/frontend/log2timeline.py" does not exist.
Looking at the spec for python-plaso, this just miiiight be because it's being deleted in the %install phase ;)
looking at it closer, you seem to delete files that "also exist" as executables in %_bindir. This is a mistake. These are different files -- implementations of CLI interfaces as supposed to some library components or something. Do not remove them. m.
On Wed, Feb 15, 2017 at 8:04 AM, jan matejek <jmatejek@suse.com> wrote:
On 15.2.2017 13:58, jan matejek wrote:
hello,
well, many things changed since 13.2 ;) but none that would seem relevant to this.
On 15.2.2017 12:48, Greg Freemyer wrote:
log2timeline.py Traceback (most recent call last): File "/usr/bin/log2timeline.py", line 24, in <module> from plaso.frontend import log2timeline ImportError: cannot import name log2timeline
this is as plain as you can get: a module is missing. In particular, the file "%{python_sitelib}/plaso/frontend/log2timeline.py" does not exist.
Looking at the spec for python-plaso, this just miiiight be because it's being deleted in the %install phase ;)
looking at it closer, you seem to delete files that "also exist" as executables in %_bindir. This is a mistake. These are different files -- implementations of CLI interfaces as supposed to some library components or something. Do not remove them.
m.
Thanks a lot Jan. No idea why I was deleting those, but it must have been to address an old plaso install bug. I clearly haven't used any of those front-ends since I updated the package from 1.4 to 1.5. Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
Greg Freemyer
-
jan matejek