docs/2.developers/4.user-guide/90.development/10.troubleshooting.md
This page provides a guide to common issues encountered when using a Pathway.
As with any powerful tool, there is a learning curve to using Pathway effectively. This guide will outline some of the most common problems developers encounter when working with Pathway, along with tips and best practices for avoiding these pitfalls. Whether you are new to Pathway or an experienced user, this guide will help you to optimize your workflow and avoid common mistakes. By following these guidelines, you can save yourself time and frustration and get the most out of Pathway.
So let's get started!
:article-toc-without-title
If a module is missing or you encounter an issue reproducing the examples displayed on the website, you will likely need the latest version of Pathway. The best solution is to reinstall it.
⚠️ Pathway requires Python 3.10 or higher and runs on Linux and MacOS.
Possible error messages:
This is not the real Pathway package.ModuleNotFoundError: No module named 'pathway.stdlib'Solution:
pip uninstall pathway && pip install pathway
--force-reinstall:pip install --force-reinstall pathway
You can access your Pathway version using pw.__version_ or pathway --version in the CLI.
⚠️ Windows is currently not supported.
When using docker on MacOS, make sure to have a linux/x86_64 platform:
FROM --platform:linux/x86_64 python:3.10⚠️ Pathway is currently not supported on Windows. Windows users may want to use Windows Subsystem for Linux (WSL), docker, or a VM.
You can also try these steps in an online notebook environment like Colab.
You launch your Pathway application, and nothing happens: no outputs, no errors. The application terminates without error, but the expected output, whether stdout or a CSV file, is empty.
Your application likely builds the dataflow, but doesn't launch a computation using it. You need to trigger the computation:
pw.run() (in addition to the use of output connectors),pw.debug.compute_and_print.Explanation:
pw.run(), while in the static mode, the computation is triggered at each output connector call.
See our article about streaming and static modes for more details.Similarly to above, you launch your Pathway application, and nothing happens. The application is running, there is no error but, at the same time, the output remains empty.
You input data is likely to be at fault:
Error message:
ValueError: universes do not matchExplanation:
update_cells or update_rows, require the universes to be identical, or at least one should be a subset of the other.
Pathway will raise an error when it is impossible to infer whether two tables have the same universe.
You can manually assert that the two universes are compatible with unsafe_promise_same_universe_as or unsafe_promise_universe_is_subset_of.Solutions:
T1=T1.unsafe_promise_same_universe_as(T2)
# OR
T1=T1.unsafe_promise_universe_is_subset_of(T2)
UnstructuredParser utilizes the unstructured.partition.auto module for parsing files under the hood.
This module calls the magic library for determining the file mime type, in case the magic dependency is missing, unstructured library will throw the following exception:
Partitioning is not supported for the FileType.UNK file type.
To resolve this, you should install libmagic, or magic library. If you are running into this issue on MacOS, you can install it with:
brew install libmagic
If you are running it on Google Colab or a Debian-based Linux environment, you can install it with:
apt install libmagic1
For more information, see: filemagic installation, and python-magic.
<!-- REMOVING datetime type errors ## Type errors ### Datetime Possible error message: - `TypeError: argument 'values': unsupported value type: Timestamp` Solution: - Cast to a regular timestamp (int) using `datetime.timestamp` Explanation: - Pathway does not currently support `datetime.datetime`, and using those should result in such `TypeError`. You can cast the `datetime.datetime` to integer using a `pw.apply` with `datetime.timestamp`. -->We hope this guide has helped identify and avoid common mistakes when using Pathway. Our team is always happy to help you find a solution to your problem and ensure that you get the most out of Pathway. If you have any questions or encounter issues not covered in this guide, don't hesitate to get in touch with us on our Discord channel.