Hi,
I could not download the sample data as it gives me the following error, does it have anything to do with the enterprise envirment? Thank you.
`Traceback (most recent call last):
File “viktor_connector\connector.pyx”, line 298, in connector.Job.execute
File “viktor\core.pyx”, line 2027, in viktor.core._handle_job
File “viktor\core.pyx”, line 1973, in viktor.core._handle_job._handle_button
File “viktor\result.pyx”, line 151, in viktor.result.DownloadResult._serialize
File “viktor\result.pyx”, line 152, in viktor.result.DownloadResult._serialize
File “viktor\api_v1.pyx”, line 1806, in viktor.api_v1._API._upload_temporary_file
File “viktor\api_v1.pyx”, line 1790, in viktor.api_v1._API._generate_temporary_file_urls
viktor._vendor.requests.exceptions.SSLError: HTTPSConnectionPool(host=‘cloud.viktor.ai’, port=443): Max retries exceeded with url: /api/storage/temporary_file/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)’)))
Param:
Section0.download_sample_csv = DownloadButton(
"Download sample CSV file",
method="perform_download",
visible=Lookup("Section0.get_sample_csv_toggle"),
flex=30,
)
Controller:
@staticmethod
def _get_sample_file():
gef_file_path = Path(__file__).parent / 'Sample_test.csv'
return File.from_path(gef_file_path)
def perform_download(self, **kwargs):
gef_file = self._get_sample_file()
return DownloadResult(gef_file, "Sample_test.csv")
Regarding analysing the user-uploaded files, I suspect I got the follow error for the similar reason:
Traceback (most recent call last):
File “viktor_connector\connector.pyx”, line 298, in connector.Job.execute
File “viktor\core.pyx”, line 2029, in viktor.core._handle_job
File “viktor\core.pyx”, line 2012, in viktor.core._handle_job._handle_view
File “viktor\views.pyx”, line 2519, in viktor.views.View._wrapper
File “C:\Users.…app.py”, line 193, in plot_combined_subplots
cs_points, all_data = extract_uploaded_data(epa_CS, file_resource,params.Section0.skip_rows)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users.…functions.py”, line 113, in extract_uploaded_data
csv_file = FileResource.file.getvalue(“ISO-8859-1”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “viktor\core.pyx”, line 1074, in viktor.core.File.getvalue
File “viktor\core.pyx”, line 1059, in viktor.core.File.open
File “viktor\core.pyx”, line 894, in viktor.core._URLFileManager.create_text_file
File “viktor\core.pyx”, line 732, in viktor.core._TextURLFile.init
File “viktor\core.pyx”, line 728, in viktor.core._TextURLFile.init
File “viktor\core.pyx”, line 628, in viktor.core._ResponseStream.init
File “viktor\core.pyx”, line 642, in viktor.core._ResponseStream._create_iterator
ConnectionError: Could not connect to url ‘https://cloud.viktor.ai/api/workspaces/4853/files/5343/download/’.