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

Clicking buttons in the 'Configurations' tab throw errors #63

Closed
KINOTheProducer opened this issue Apr 21, 2021 · 7 comments
Closed

Clicking buttons in the 'Configurations' tab throw errors #63

KINOTheProducer opened this issue Apr 21, 2021 · 7 comments

Comments

@KINOTheProducer
Copy link

Hey there, thank you for the wonderful bot! Trying to understand where my issue lies here.

Every button (except 'Read last log lines') throws an error like this:

Traceback (most recent call last):
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\psutil\_pswindows.py", line 780, in cmdline
    ret = cext.proc_cmdline(self.pid, use_peb=True)
PermissionError: [WinError 5] Access is denied: '(originated from OpenProcess)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\psutil\_pswindows.py", line 679, in wrapper
    return fun(self, *args, **kwargs)
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\psutil\_pswindows.py", line 695, in wrapper
    return fun(self, *args, **kwargs)
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\psutil\_pswindows.py", line 783, in cmdline
    ret = cext.proc_cmdline(self.pid, use_peb=False)
PermissionError: [WinError 5] Access is denied: '(originated from OpenProcess)'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\telegram\ext\dispatcher.py", line 442, in process_update
    handler.handle_update(update, self, check, context)
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\telegram\ext\conversationhandler.py", line 549, in handle_update
    new_state = handler.handle_update(update, dispatcher, check_result, context)
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\telegram\ext\handler.py", line 160, in handle_update
    return self.callback(update, context)
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\btb_manager_telegram\handlers.py", line 148, in menu
    re = buttons.edit_coin()
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\btb_manager_telegram\buttons.py", line 364, in edit_coin
    if not get_binance_trade_bot_process():
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\btb_manager_telegram\utils.py", line 82, in get_binance_trade_bot_process
    name in proc.name() or name in " ".join(proc.cmdline())
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\psutil\__init__.py", line 677, in cmdline
    return self._proc.cmdline()
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\site-packages\psutil\_pswindows.py", line 681, in wrapper
    raise convert_oserror(err, pid=self.pid, name=self._name)
psutil.AccessDenied: psutil.AccessDenied (pid=116, name='csrss.exe')

I can't decypher what it means myself, but maybe you can help.

Thank you so much in advance!

@lorcalhost
Copy link
Owner

lorcalhost commented Apr 22, 2021

Hi @KINOTheProducer ,
as discussed in #54, BTB-manager-telegram currently has some problems with read/write/execute permissions on Windows.

Although it is an experimental feature you can try running the bot via docker.

To do so run the command

$ python3 docker_setup.py

to set up the environment and Docker image.

After the setup you can run the bot using the --docker flag:

$ python3 -m btb_manager_telegram --docker

Let me know if this helps :)

@KINOTheProducer
Copy link
Author

Hi @lorcalhost - grazie mille per la risposta!

I'm trying to install the Docker image as you said, but have come across this error, even though these files exist in the binance-trade-bot filesystem already:

[*] Is a Binance Trade Bot installation already present on your filesystem (y/n)?: y
[*] Enter path to your previous Binance Trade bot installation (e.g. ../binance-trade-bot/): ../binance-trade-bot
[+] Path ../binance-trade-bot found on the filesystem.
[-] Unable to find file ../binance-trade-bot\user.cfg
        Please manually create it at ./binance-trade-bot/user.cfg
[-] Unable to find file ../binance-trade-bot\supported_coin_list
        Please manually create it at ./binance-trade-bot/supported_coin_list
[-] Unable to find file ../binance-trade-bot\config/apprise.yml
        Please manually create it at ./binance-trade-bot/config/apprise.yml
[*] Would you like to run the setup script for running the bot in a docker container (y/n)?:

Is it fine to continue the setup, or should I fix something first?

@lorcalhost
Copy link
Owner

Manually copy those 3 files into BTB-manager-telegram/binance-trade-bot.
Then run the docker_setup.py script again selection n as option when asked Is a Binance Trade Bot installation already present on your filesystem (y/n)?

@KINOTheProducer
Copy link
Author

Strange, I'm now getting this, even though those exact files have been copied into the directory you mentioned:

←[33m[*] Is a Binance Trade Bot installation already present on your filesystem (y/n)?: ←[39mn
←[33m[*] Please manually create/edit the following files:
        - ./binance-trade-bot/user.cfg
        - ./binance-trade-bot/supported_coin_list
        - ./binance-trade-bot/config/apprise.yml
←[33m[*] Would you like to run the setup script for running the bot in a docker container (y/n)?:

@lorcalhost
Copy link
Owner

That's the intended behavior, you can proceed.

@KINOTheProducer
Copy link
Author

Upon proceeding, I get this:

←[33m[*] Setting things up for docker...←[39m
Traceback (most recent call last):
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 71, in docker_setup
    process = subprocess.Popen(
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 80, in docker_setup
    make_image()
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 36, in make_image
    check_process = subprocess.Popen(
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 195, in <module>
    main()
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 182, in main
    default()
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 148, in default
    docker_setup()
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 83, in docker_setup
    update_image()
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 62, in update_image
    delete_image()
  File "C:\Users\Anthony\Desktop\Binance Trade Bot\BTB-manager-telegram\docker_setup.py", line 25, in delete_image
    process = subprocess.Popen(command, stderr=SUBPIPE, stdin=SUBPIPE)
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\Anthony\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1420, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

@lorcalhost
Copy link
Owner

There seem to be some problems with your installation.
Running on Windows is a bit buggy in general, if you can I strongly recommend running it through Linux or Windows WSL

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