facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.08k stars 322 forks source link

'500 Internal Server Error' while accessing 'robyn_outputs' - robyn_api for python #880

Closed apoorvabc closed 5 months ago

apoorvabc commented 7 months ago

Hello team,

I am working with the robyn api for python and facing issue accessing one of the functions 'robyn_outputs'. https://github.com/facebookexperimental/Robyn/blob/main/robyn_api/robyn_python_notebook.ipynb

# Get response
OutputCollect = robyn_api('robyn_outputs',payload=payload)

I am encountering '500 Internal Server Error' despite having the payload in the correct format. Each component (InputCollect, OutputModels, outputsArgs) contains valid data in the right format.

ebyjose commented 7 months ago

Can you share the payload and sample dataset so that we can replicate the issue to check what might be happening

apoorvabc commented 7 months ago

The issue persists with the simulated dataset used in the demo script -https://github.com/facebookexperimental/Robyn/blob/main/robyn_api/robyn_python_notebook.ipynb

Here is the payload robyn_outputs_payload.json

apoorvabc commented 7 months ago

There was an issue with the port since I had multiple sessions running which led to this error. This now stands resolved.

apoorvabc commented 5 months ago

Earlier it worked fine and I was able to run the allocator function and got the desired output. However, I am currently having issues at output collect {'error': '500 - Internal server error'}. Made sure there are no open ports running and the existing connections have been closed and retried. I am using the same dataset as shown in the example with no further changes done. Kindly assist.

Also gives the following error at times - ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9999): Max retries exceeded with url: /robyn_run (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000002AA4C92AAA0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

ebyjose commented 5 months ago

Tried again with stimulate data but unable to replicate issue. Can you try changing the plot location to a smaller file path, sometimes it may help (a usual suspect on windows machine)

apoorvabc commented 5 months ago

It was indeed an issue with the path to the plot folder. I had overlooked it assuming it was an issue to the connection due to the error. Thank you for pointing me to this.