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

WAKADUMP - EXCEPTION WHILE CONVERTING TO KEEN.IO - PYTHON 3.10.10 #11

Open
aironangel opened this issue Mar 10, 2023 · 9 comments
Open

Comments

@aironangel
Copy link

Hi
I'm not a python expert, and I installed python on my laptop, version 3.10.10.
When I tried to launch wakadump I got exception
image

I've also tried to install using pip3 but without success.

Any Idea?

thanks in advance.

@alanhamlett
Copy link
Member

alanhamlett commented Mar 11, 2023

Try running pip3 install --upgrade wakadump then run wakadump --help and it should work?

@aironangel
Copy link
Author

Thanks Alan,
I've tried what you suggested, the update come to completion but now I've the following issue:
image

@alanhamlett
Copy link
Member

Try running: pip3 install --upgrade urllib3

@aironangel
Copy link
Author

still error, but different:

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts\wakadump.exe\__main__.py", line 7, in <module>
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\wakadump\cli.py", line 54, in main
    module = import_module('.formats.%s' % module_name, package=__package__)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\wakadump\formats\keenio.py", line 16, in <module>
    from keen.client import KeenClient
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\keen\__init__.py", line 2, in <module>
    from keen.client import KeenClient
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\keen\client.py", line 5, in <module>
    from keen import persistence_strategies, exceptions, saved_queries, cached_datasets
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\keen\saved_queries.py", line 10, in <module>
    from keen.api import HTTPMethods
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\keen\api.py", line 6, in <module>
    import requests
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\__init__.py", line 64, in <module>
    from . import utils
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\utils.py", line 28, in <module>
    from .cookies import RequestsCookieJar, cookiejar_from_dict
  File "C:\Users\xxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\cookies.py", line 164, in <module>
    class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

Could, using a previous version of Python, help?

@alanhamlett
Copy link
Member

Could, using a previous version of Python, help?

Yes, that would probably fix it.

@aironangel
Copy link
Author

aironangel commented Mar 13, 2023

do you have a stable version to suggest?

@alanhamlett
Copy link
Member

I'm testing on Python 3.9.

@aironangel
Copy link
Author

I've installed python 3.9 but at the moment I've a new error:

Preparing keen.io events  [------------------------------------]    0%
Traceback (most recent call last):
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\Scripts\wakadump.exe\__main__.py", line 7, in <module>
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\site-packages\wakadump\cli.py", line 56, in main
    formatter.run()
  File "C:\Users\****\AppData\Local\Programs\Python\Python39\lib\site-packages\wakadump\formats\keenio.py", line 59, in run
    'seconds': day['grand_total']['total_seconds'],
KeyError: 'grand_total'

C:\Temp>python --version
Python 3.9.0

C:\Temp>

Does this depend on python version, yet?
I haven't installed all patches of 3.9, do this could impact on final result?

thanks again.

@aironangel
Copy link
Author

Sorry Alan: I've found the issue.
I was importing raw data instead of grand total.

Now It works, but I've an error message about API Key.

I used project ID and Write Key ID: are these correct?

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

2 participants