ianknauer

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

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.

Last Post!

NobbZ

NobbZ

Before you started the application, have you sources the environments activation script?

Where Next?

Popular in Questions Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54260 488
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement