Pycee
Pycee is a tool to provide possible solutions for errors in python code. Solutions are from Stackoverflow questions that may be related to the code error. This is a reimplementation of Emillie Thiselton's Pycee.
:gear: Installation
pip3 install pycee
:computer: Using Pycee2
After installed, all you have to do is to call pycee passing the name of the file that contains the error.
pycee file_with_error.py
Here's an example:
Suppose script.py contains the following code:
# Brazil world cup titles by year
world_cup_titles = [1958,1962,1970,1994,2002]
# print year of the 5th title
print(world_cup_titles[5])
executing this script will result in an error like this:
Traceback (most recent call last):
File "example_code.py", line 4, in <module>
print(world_cup_titles[5])
IndexError: list index out of range
Then you can use pycee to provide an possible answer for the error, linke so:
pycee script.py
Which, finally, will output some answers form stackoverflow that are possibily related to your error:
Solution 1:
Generally it means that you are providing an index for which a list element
does not exist.
E.g, if your list was [1, 3, 5, 7], and you asked for the element at index
10, you would be well out of bounds and receive an error, as only elements 0
through 3 exist.
...
(rest of the output with two more answers omitted from this example)
:gear: Installation (for contributors)
# clone the repository your development environment
git clone https://github.com/marceloFA/pycee2.git
# cd into the project directory
cd pycee2/
# create a virtual environment to install packages isolatedly
python3 -m venv venv # if you use venv
virtualenv venv # else if you use virtualenv
# activate the virtual env
source venv/bin/activate
# install packages required to run pycee
pip3 install -r requirements.txt requirements-dev.txt
# using pycee in development mode, from the project root
python3 usage.py example_code.py
# running tests, from the project root
pytest
:building_construction: Maintainers
| Leonardo Furtado | Marcelo Almeida |
Metadata
Release files for pycee2 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycee2-0.1.tar.gz | 13.1 kB | Without provenance | Details for pycee2-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycee2-0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for pycee2-0.1-py2.py3-none-any.whl |
Total release size: 27.3 kB
Release files / pycee2-0.1.tar.gz
| Download URL | pycee2-0.1.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ce45bad6bf55d5592d4f20113d277f6c9e430257f35ad15f95c1943c5f3bb99
|
|
BLAKE2b-256 checksum How to use checksums |
21b9b5bff8e1d9c3d332aea8b87bdde31d22a6e95e4e2723ca161355e64fab36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
|
Release files / pycee2-0.1-py2.py3-none-any.whl
| Download URL | pycee2-0.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c4d03127801dad5373666e5f75e4423ed96d77b55afad2ac02b9ca4708f01e5f
|
|
BLAKE2b-256 checksum How to use checksums |
a4b3ab1abb8f3b10ce869dc847dd7b977f1565a864f5926accfb1bd4c15c38e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
|
Security for pycee2 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.