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

Is log written in installation dir? #540

Closed
MarkoPaasila opened this issue Apr 7, 2019 · 1 comment
Closed

Is log written in installation dir? #540

MarkoPaasila opened this issue Apr 7, 2019 · 1 comment
Labels
[0] duplicate duplicate issue [3] Type: Bug [4] Priority: Medium [5] Small Task Indicates size of task. Est. between one and two hours

Comments

@MarkoPaasila
Copy link
Collaborator

Expected Behavior

Bot starts normally

Actual Behavior

dexbot-cli -v4 run gives me:

[marko@RPI-ARCH dexbot]$ dexbot-cli -v4 run
2019-04-07 09:38:00,746 INFO Using proxy None:80 http
Current Uptick Wallet Passphrase:
Traceback (most recent call last):
  File "/usr/bin/dexbot-cli", line 11, in <module>
    load_entry_point('dexbot', 'console_scripts', 'dexbot-cli')()
  File "/usr/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/marko/dexbot/dexbot/ui.py", line 140, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/marko/dexbot/dexbot/ui.py", line 93, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/marko/dexbot/dexbot/ui.py", line 130, in new_func
    return ctx.invoke(f, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/marko/dexbot/dexbot/ui.py", line 52, in new_func
    fh = logging.FileHandler(filename)
  File "/usr/lib/python3.7/logging/__init__.py", line 1092, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.7/logging/__init__.py", line 1121, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: '/usr/bin/dexbot.log'

Steps to Reproduce the Problem

  1. git checkout master and git pull
  2. Build current master with: sudo pip3 install -e .
  3. Run as non root with dexbot-cli -v4 run

Specifications

  • Version: 0.10.1
  • OS: Arch Linux Arm
@MarkoPaasila MarkoPaasila added [1] Status: Available [3] Type: Bug [4] Priority: Medium [5] Small Task Indicates size of task. Est. between one and two hours labels Apr 7, 2019
@bitphage bitphage added the [0] duplicate duplicate issue label Apr 7, 2019
@bitphage
Copy link
Collaborator

bitphage commented Apr 7, 2019

Originated from #490

bitphage added a commit to bitphage/DEXBot that referenced this issue Apr 25, 2019
In b3e8ff1 default logfile was changed
to the same directory where the cli executable is. This is a wrong
approach as dexbot can be installed in multiple ways. System-wide
install will put the binary into /usr/bin/dexbot-cli. Applicateion must
not try to log into /usr/bin/.

This change makes logging consistent with GUI, which stores the log into
user data directory, like ~/.local/share/dexbot/dexbot.log

Closes: Codaone#490, Codaone#540
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[0] duplicate duplicate issue [3] Type: Bug [4] Priority: Medium [5] Small Task Indicates size of task. Est. between one and two hours
Projects
None yet
Development

No branches or pull requests

2 participants