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

Troubleshooting docs 244 #225

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ output
.venv
.asv
venv

# Ignore vim swp files
*.swp

1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Contents:
quick-start
api
migrating
troubleshooting


If you still can't find what you're looking for, try in one of the following pages:
Expand Down
34 changes: 34 additions & 0 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
===============
Troubleshooting
===============

This troubleshooting guide includes common issues users have faced and tips for dealing with them.

If you don't find answers to your problems here, be sure to check out ``betterproto``'s `Slack`!

Upgrading betterproto in a poetry environment
=============================================

It seems like in some situations, installing and then updating ``betterproto``
in ``poetry`` environments doesn't work.
If, after updating ``betterproto``, you're not getting the new features you wanted,
it might be because of the current virtual environment ``poetry`` has created.
While there's probably a "surgical" fix, we've found that removing the venv and re-installing it works.

To do that, run ``poetry env info`` to see the venv path:

.. code-block:: shell
:emphasize-lines: 5

$ poetry env info
Virtualenv
Python: 3.8.7
Implementation: CPython
Path: /home/username/.cache/pypoetry/virtualenvs/project-name-random-py3.8 # <-- THIS PATH
Valid: True

Then just ``rm -rf`` that path to delete the venv,
and re-create the env using ``poetry shell`` and ``poetry install``.

.. _Slack: https://join.slack.com/t/betterproto/shared_invite/zt-f0n0uolx-iN8gBNrkPxtKHTLpG3o1OQ