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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery apps not working fully #8

Closed
leungi opened this issue Oct 13, 2019 · 5 comments
Closed

Gallery apps not working fully #8

leungi opened this issue Oct 13, 2019 · 5 comments

Comments

@leungi
Copy link

leungi commented Oct 13, 2019

First off, thanks for the great resource!

I tried containerizing a simple demo myself, and can't get it working on a CentOS (though it works on Windows); however, your image works 馃憤

But an issue with the gallery piece (only spacy demo is working), as shown below:

streamlit_error

Exact error message is:

URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)>
File "/usr/local/lib/python3.7/site-packages/streamlit/ScriptRunner.py", line 306, in _run_script exec(code, module.__dict__)
File "/app/app.py", line 40, in <module> src.st_extensions.write_page(page)
File "/app/src/st_extensions.py", line 32, in write_page page.write()
File "/app/src/pages/gallery/index.py", line 51, in write python_code = get_file_content_as_string(run_app.url)
File "/usr/local/lib/python3.7/site-packages/streamlit/caching.py", line 544, in wrapped_func return get_or_set_cache()
File "/usr/local/lib/python3.7/site-packages/streamlit/caching.py", line 526, in get_or_set_cache return_value = func(*args, **kwargs)
File "/app/src/pages/gallery/index.py", line 122, in get_file_content_as_string data = urllib.request.urlopen(url).read()
File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open response = self._open(req, data)
File "/usr/local/lib/python3.7/urllib/request.py", line 543, in _open '_open', req)
File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args)
File "/usr/local/lib/python3.7/urllib/request.py", line 1360, in https_open context=self._context, check_hostname=self._check_hostname)
File "/usr/local/lib/python3.7/urllib/request.py", line 1319, in do_open raise URLError(err)
@MarcSkovMadsen
Copy link
Owner

Hi @leungi

Thanks so much for reaching out. I will take a look ASAP.

Please confirm that your are running this locally after having cloned the repo and followed the installation instructions.

In the mean while I think your video image is awesome. How do you create something like that?. I would like to be able to do the same.

Thanks.

@leungi
Copy link
Author

leungi commented Oct 14, 2019

Thanks for prompt reply @MarcSkovMadsen.

I didn't clone repo, and mounted container by pulling from your Docker Hub repo.

I'll clone the repo, build from it, and update this post.

For the .gif, I use screentogif.

@MarcSkovMadsen
Copy link
Owner

Hi @leungi . I found this on https://stackoverflow.com/questions/50236117/scraping-ssl-certificate-verify-failed-error-for-http-en-wikipedia-org. It seems that on MacOs you need to install some certificates manually. It's described in the link.

Let me know if it can help you. Thanks.

@leungi
Copy link
Author

leungi commented Oct 20, 2019

Thanks for reference @MarcSkovMadsen; I'm actually on Windows and I typically bypass this with conda config --set ssl_verify False.

I'd need to bash into your docker container and try; will update.

@leungi
Copy link
Author

leungi commented Mar 29, 2020

Apologies for much delayed response @MarcSkovMadsen.

It seems that internal cyber-security blocked all public facing IP, and ./src/pages/gallery/index.py source most of the content directly from github.com, hence the error.

The best solution is to download the hosted app locally and read from disk.

Thanks again for your suggestions.

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

No branches or pull requests

2 participants