ianknauer
Export (or erlport) issues when deploying
I have some code in my application that calls to a python function (relying on a python library) to convert HTML pages to PDFS. Using the directions in the blog post here i’m able to use export to run a python script in my application in local development.
I’m having issues when it comes to getting the same behaviour on a production server where i deploy using edeliver & distillery. Currently i’m getting an error where it can’t find the module that i’ve defined.
my guess is that it’s because the venv virtual machine isn’t running, but it’s not clear on how to follow those instructions when it comes to distillery releases (starting up a virtual server afterwards for example?).
My Python code is here and the place i’m calling it from is here.
Anyone have experience deploying python code and can point me in the right direction?
Most Liked
NobbZ
{:ok, py} = Python.start(python_path: Path.expand("lib/python"))
When you do releases, this is not available. You will need to put the python code into your priv folder and then use :code.priv_dir/1 to find it.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








