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

Seemingly incompatible with python 3 #31

Open
Greg-J opened this issue Jun 10, 2021 · 1 comment
Open

Seemingly incompatible with python 3 #31

Greg-J opened this issue Jun 10, 2021 · 1 comment

Comments

@Greg-J
Copy link

Greg-J commented Jun 10, 2021

python3 setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/local/lib/python3.8/dist-packages/mclogalyzer
copying build/lib/mclogalyzer/template.html -> /usr/local/lib/python3.8/dist-packages/mclogalyzer
copying build/lib/mclogalyzer/__init__.py -> /usr/local/lib/python3.8/dist-packages/mclogalyzer
copying build/lib/mclogalyzer/mclogalyzer.py -> /usr/local/lib/python3.8/dist-packages/mclogalyzer
byte-compiling /usr/local/lib/python3.8/dist-packages/mclogalyzer/__init__.py to __init__.cpython-38.pyc
byte-compiling /usr/local/lib/python3.8/dist-packages/mclogalyzer/mclogalyzer.py to mclogalyzer.cpython-38.pyc
  File "/usr/local/lib/python3.8/dist-packages/mclogalyzer/mclogalyzer.py", line 284
    print "### Warning: Unable to parse date in line=%s" % line
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("### Warning: Unable to parse date in line=%s" % line)?

running install_scripts
copying build/scripts-3.8/mclogalyzer -> /usr/local/bin
changing mode of /usr/local/bin/mclogalyzer to 775
running install_egg_info
Writing /usr/local/lib/python3.8/dist-packages/mclogalyzer-1.1.egg-info

I tried to process the logs anyway, but am met with:

Traceback (most recent call last):
  File "/usr/local/bin/mclogalyzer", line 3, in <module>
    import mclogalyzer
  File "/usr/local/lib/python3.8/dist-packages/mclogalyzer/__init__.py", line 1, in <module>
    from mclogalyzer import main
ImportError: cannot import name 'main' from partially initialized module 'mclogalyzer' (most likely due to a circular import) (/usr/local/lib/python3.8/dist-packages/mclogalyzer/__init__.py)
@Greg-J
Copy link
Author

Greg-J commented Jun 10, 2021

Doesn't seem to work with python2.7 either.

Parsing log 2021-05-12-1.log.gz (2021-05-12) ...
Traceback (most recent call last):
  File "/usr/local/bin/mclogalyzer", line 7, in <module>
    mclogalyzer.main()
  File "/usr/local/lib/python2.7/dist-packages/mclogalyzer/mclogalyzer.py", line 542, in main
    users, server, chats = parse_logs(args["logdir"], since, whitelist_users)
  File "/usr/local/lib/python2.7/dist-packages/mclogalyzer/mclogalyzer.py", line 449, in parse_logs
    if date is None or (since is not None and date < since):
UnboundLocalError: local variable 'date' referenced before assignment```

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

No branches or pull requests

1 participant