Skip to content

Commit a746ba2

Browse files
committed
Add a setup gotchas section to arch.md.
1 parent c155f0a commit a746ba2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

gel/_internal/arch.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,43 @@ Run `python tools/gen_models.py` to generate test models into your virtual envir
148148
and you should be able to just run `$ pytest`.
149149
150150
151+
### Setup gotchas
152+
153+
#### Using a system-wide `pytest` install
154+
155+
Errors like `ModuleNotFoundError: No module named typing_inspection’` can
156+
occur when using a system wide pytest installation.
157+
158+
This can be caused by having run either `pip install pytest` outside a venv
159+
or `apt install python3-pytest`.
160+
161+
If you want to keep these installations, you can still run tests locally by
162+
running `python -m pytest`.
163+
164+
#### `make clean && make` to fix binary incompatibilities
165+
166+
Errors such as:
167+
```bash
168+
gel.protocol.protocol.ExecuteContext size changed, may indicate binary
169+
incompatibility. Expected 152 from C header, got 184 from PyObject
170+
```
171+
172+
Indicate that a `pyx` file has changed. A clean rebuild is necessary.
173+
174+
#### Other errors
175+
176+
Some other errors that are caused by a weird environment, but more details are
177+
needed. If you see one of these, please note the steps used to fix them!
178+
179+
```bash
180+
Traceback (most recent call last):
181+
File "<string>", line 1, in <module>
182+
File "/home/dnwpark/work/dev-3.12/edgedb-python/gel/__init__.py", line 32,
183+
in <module>
184+
from gel.datatypes.datatypes import Record, Set, Object, Array
185+
ImportError: cannot import name 'Record' from 'gel.datatypes.datatypes'
186+
```
187+
151188
### Running Tests
152189

153190
```bash

0 commit comments

Comments
 (0)