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

Error when running in Docker #241

Closed
alpert1 opened this issue Jan 15, 2023 · 3 comments
Closed

Error when running in Docker #241

alpert1 opened this issue Jan 15, 2023 · 3 comments

Comments

@alpert1
Copy link

alpert1 commented Jan 15, 2023

Hi there,

I've tried to run the scanner in a Docker container, but am immediately greeted with following error:

2023-01-15 19:41:44 INFO     Loaded config from environment variables
2023-01-15 19:41:44 WARNING  No token files in token path.
2023-01-15 19:41:44 INFO       ____  ___  ____  ___    ____   ___   __   __ _  __ _  ____  ____  
2023-01-15 19:41:44 INFO      (_  _)/ __)(_  _)/ __)  / ___) / __) / _\ (  ( \(  ( \(  __)(  _ \ 
2023-01-15 19:41:44 INFO        )( ( (_ \  )( ( (_ \  \___ \( (__ /    \/    //    / ) _)  )   / 
2023-01-15 19:41:44 INFO       (__) \___/ (__) \___/  (____/ \___)\_/\_/\_)__)\_)__)(____)(__\_) 
2023-01-15 19:41:44 INFO     
2023-01-15 19:41:44 INFO     Version 1.14.4
2023-01-15 19:41:44 INFO     ©2022, Henning Merklinger
2023-01-15 19:41:44 INFO     For documentation and support please visit https://github.com/Der-Henning/tgtg
2023-01-15 19:41:44 INFO     
Traceback (most recent call last):
  File "/home/tgtg/.local/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/app/tgtg/tgtg_client.py", line 131, in _post
    response.json()
  File "/home/tgtg/.local/lib/python3.10/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/app/main.py", line 267, in <module>
    main()
  File "/app/main.py", line 166, in main
    _start_scanner(config)
  File "/app/main.py", line 182, in _start_scanner
    scanner = Scanner(config)
  File "/app/scanner.py", line 34, in __init__
    self.tgtg_client.login()
  File "/app/tgtg/tgtg_client.py", line 216, in login
    response = self._post(
  File "/app/tgtg/tgtg_client.py", line 140, in _post
    self.last_time_token_refreshed -= timedelta(hours=1)
TypeError: unsupported operand type(s) for -=: 'NoneType' and 'datetime.timedelta'

What am I doing wrong here?

@Der-Henning
Copy link
Owner

Hi @alpert1.
You are doing nothing wrong. I am already aware of this bug and will provide a new release in the next few minutes.
Thank you for reporting the bug.

@Der-Henning
Copy link
Owner

The latest release v1.14.5 (latest image) is now live and should work.

@alpert1
Copy link
Author

alpert1 commented Jan 15, 2023

Thank you very much! It probably works now, as I receiving a 403 TGTG API Error after the update. 🙄 I guess I will have to wait until I have a normal internet connection with changing ip adresses again, as I have to use a LTE-router for a few more days due to a provider change.

@alpert1 alpert1 closed this as completed Jan 16, 2023
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