Comments (5)
Hello @srnae05,
I am a beginner in linux.
Not sure how much beginner, so if you know most of this already, ignore it: On Linux (or more generally, in all POSIX systems) the shell searches for commands in the directories given in the $PATH
environment variable. You can take a look at this list using this command:
❯ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin
Now, in the installation instructions of tbot
, you were supposed to run the install command like this:
❯ python3 setup.py install --user
[...]
Without the --user
, this command would have installed tbot to /usr/local/bin
, but your user does not have access rights to that directory. So instead, using the --user
flag, it is installed in your home-directory, more specifically into ~/.local/bin
. This directory is not in your $PATH
by default so you need to add it manually.
To do this, you have to add another command to your .bashrc
:
export PATH=~/.local/bin:$PATH
Once you then open a new shell session you should be able to run tbot
:)
from tbot.
Hello @Rahix
Thank you for the reply.
It runs now, I did not add export PATH=~/.local/bin:$PATH to ~.bashrc
I have another point,
- In the documentation, there is a step that say source /path/to/tbot/completions.sh to ~.bashrc.
This is how I did it. In the terminal, I used the source /mypathToTbot/completions.sh. However when I open the ~.bashrc, this is not reflected.
I believe I am doing something wrong here since my self test is failing
-------------------------Another Issue---------------------------------------------------------
When I execute other .py files, i get the same error KeyError: 'hello_world'. I believe that tbot is not able to find the function definition of hello_world in a .py file. How do I fix this ? Thanks !
from tbot.
In the documentation, there is a step that say source /path/to/tbot/completions.sh to ~.bashrc.
This is how I did it. In the terminal, I used the source /mypathToTbot/completions.sh. However when I open the ~.bashrc, this is not reflected.
You have to add the source command as a line in your ~/.bashrc
file:
source /mypathToTbot/completions.sh
I believe I am doing something wrong here since my self test is failing
Can you please post the entire output tbot gives you?
When I execute other .py files, i get the same error KeyError: 'hello_world'. I believe that tbot is not able to find the function definition of hello_world in a .py file. How do I fix this ?
What exact command were you running? What was the name of the python file?
from tbot.
source /mypathToTbot/completions.sh
After adding this, the self test passes. Thanks !
What exact command were you running? What was the name of the python file?
I created a file tc.py with hello_world function in my home folder. When I execute using tbot hello_world, it fails. Here is the output
`(base) root@srnae05:/home/srnae05/ACC/testCases# tbot hello_world
Warning: Failed to load /home/srnae05/ACC/testCases/tc.py:
Traceback (most recent call last):
File "/root/.local/lib/python3.7/site-packages/tbot-0.8.0-py3.7.egg/tbot/loader.py", line 160, in collect_testcases
module = load_module(f)
File "/root/.local/lib/python3.7/site-packages/tbot-0.8.0-py3.7.egg/tbot/loader.py", line 136, in load_module
module_spec.loader.exec_module(module)
File "", line 724, in exec_module
File "", line 860, in get_code
File "", line 791, in source_to_code
File "", line 219, in _call_with_frames_removed
File "/home/srnae05/ACC/testCases/tc.py", line 4
def hello_world()
^
SyntaxError: invalid syntax
tbot starting ...
├─Exception:
│ Traceback (most recent call last):
│ File "/root/.local/lib/python3.7/site-packages/tbot-0.8.0-py3.7.egg/tbot/main.py", line 295, in main
│ func = testcases[tc]
│ KeyError: 'hello_world'
├─────────────────────────────────────────
└─FAILURE (0.220s)`
from tbot.
The command-output already points to the issue. tbot complains that it can't load your testcase file:
Warning: Failed to load /home/srnae05/ACC/testCases/tc.py:
Below that you can see the traceback of the failure, which ends with an error message:
File "/home/srnae05/ACC/testCases/tc.py", line 4
def hello_world()
^
SyntaxError: invalid syntax
You'll have to figure out what you did wrong, but from the output I suspect you forgot the :
after the function definition ;)
from tbot.
Related Issues (20)
- Tbot Selftest fails in virtual environment HOT 3
- Compatibility of `machine.linux.Path` with unaware code HOT 10
- Order of requested roles should not matter HOT 2
- Paramiko SSHException: not found in known_hosts HOT 2
- [Help] Run a pipe shell command HOT 3
- How to access role.Board from role.BoardUboot and role.BoardLinux? HOT 4
- Support jump hosts in the SSH connector HOT 2
- At least Python 3.8 is required by tbot/newbot HOT 3
- Unhandled escape sequences clobber tbot output
- When running tests via SSH connector and SSH connection breaks due to device crash TBot hangs waiting indefinitely for SSH HOT 3
- shell.copy() does not accept globs in source path HOT 2
- Base exception classed raised HOT 3
- newbot CLI cannot generate log files
- Continuously print console to stdout
- Early load config when integrating tbot into pytest HOT 6
- Memory leak in SubprocessChannelIO HOT 3
- Processes not being terminated after SSH connection HOT 6
- Display SSH connection errors
- Timeout when waiting for a temination of a subprocess is hardcoded HOT 3
- Weird power cycle recursion HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tbot.