Open insaneadinesia opened 10 months ago
Your directory should be named
/Users/mamatosai/efishery/pgsync/plugins
Elaborating on @4d11 's answer:
The python module (aka the folder containing your my_plugin.py
) must be named "plugins" and must contain an (empty) __init__.py
file. The path you add to your PYTHONPATH is then the path to the parent-directory of that module (so you dont include the /plugins-part).
PGSync version: 2.5.0
Postgres version: postgres (PostgreSQL) 14.8 (Homebrew)
Elasticsearch version: docker.elastic.co/elasticsearch/elasticsearch:7.8.0
Redis version: 7.0.8
Python version: Python 3.8.9
Problem Description: Got
ModuleNotFoundError: No module named 'plugins.'1
when define schema with plugins.export PYTHONPATH=$PYTHONPATH:/Users/mamatosai/efishery/pgsync/module
class TestPlugin(plugin.Plugin): print('masuk') name = 'Test'
efishery/pgsync/book took 2s ➜ pgsync --config schema.json -d masuk