Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] demo notebook for_analysis.ipynb throws 500 Server Error: Internal Server Error for url: #572

Open
DataBoyTX opened this issue Jul 2, 2024 · 2 comments
Assignees
Labels

Comments

@DataBoyTX
Copy link
Contributor

DataBoyTX commented Jul 2, 2024

Describe the bug

User reported this issue, but I recalled they were not using register function from previous conversation. Some visualizations run without register, but this one fails.

demo notebook for_analysis.ipynb throws 500 Server Error: Internal Server Error for url: http://...

To Reproduce

Run demo notebook for_analysis.ipynb on private server without register() and see failure on cell 5

error produced in the notebook:

---------------------------------------------------------------------------
HTTPError                                 Traceback (most recent call last)
Cell In[5], line 17
      1 hg1 = graphistry.hypergraph(
      2     df,
      3 
   (...)
     13         }
     14     })
     16 hg1_g = hg1['graph']
---> 17 hg1_g.plot()

File /opt/conda/lib/python3.10/site-packages/graphistry/PlotterBase.py:1401, in PlotterBase.plot(self, graph, nodes, name, description, render, skip_upload, as_files, memoize, extra_html, override_html_style, validate)
   1399     if skip_upload:
   1400         return dataset
-> 1401     info = PyGraphistry._etl1(dataset)
   1402 elif api_version == 3:
   1403     logger.debug("3. @PloatterBase plot: PyGraphistry.org_name(): {}".format(PyGraphistry.org_name()))

File /opt/conda/lib/python3.10/site-packages/graphistry/pygraphistry.py:2199, in PyGraphistry._etl1(dataset)
   2191 out_file = PyGraphistry._get_data_file(dataset, "json")
   2192 response = requests.post(
   2193     PyGraphistry._etl_url(),
   2194     out_file.getvalue(),
   (...)
   2197     verify=PyGraphistry._config["certificate_validation"],
   2198 )
-> 2199 response.raise_for_status()
   2201 try:
   2202     jres = response.json()

File /opt/conda/lib/python3.10/site-packages/requests/models.py:1021, in Response.raise_for_status(self)
   1016     http_error_msg = (
   1017         f"{self.status_code} Server Error: {reason} for url: {self.url}"
   1018     )
   1020 if http_error_msg:
-> 1021     raise HTTPError(http_error_msg, response=self)

HTTPError: 500 Server Error: Internal Server Error for url: http://nginx/etl?usertag=bafda75a-pygraphistry-0.33.8&agent=pygraphistry&apiversion=1&agentversion=0.33.8&key=b2c49a1a6e4c7367532c3b2d90905369
@DataBoyTX DataBoyTX added the bug label Jul 2, 2024
@DataBoyTX DataBoyTX self-assigned this Jul 2, 2024
@lmeyerov
Copy link
Contributor

lmeyerov commented Jul 2, 2024

Yeah I'm guessing plot without register, and for complex encodings, maybe missing api=3 (which we should default to as that's annoying, it's been a long time coming cc @mj3cheun @aucahuasi )

@lmeyerov
Copy link
Contributor

lmeyerov commented Jul 2, 2024

RE:Automatic login in notebooks,

Looking a bit more, maybe we can shuttle the graphistry_jwt cookie in graphistry servers via a notebook extension: https://chatgpt.com/share/550c2c64-e1ae-4009-8fe4-ed67baf86f49

Alternatively, maybe we can make .plot() in an unregistered context pop a login?

(We would also have to strip the GRAPHISTRY_TOKEN etc env vars, which is over due anyways)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants