From 0626afb42196b9004a25827b0f96a00c81ed71ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Primo=C5=BE=20Godec?= Date: Thu, 7 May 2020 14:43:17 +0200 Subject: [PATCH] Use https instead of http for udpipe models --- orangecontrib/text/preprocess/normalize.py | 2 +- orangecontrib/text/widgets/owtweetprofiler.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/orangecontrib/text/preprocess/normalize.py b/orangecontrib/text/preprocess/normalize.py index d2da940b0..c5e5404fb 100644 --- a/orangecontrib/text/preprocess/normalize.py +++ b/orangecontrib/text/preprocess/normalize.py @@ -103,7 +103,7 @@ def file_to_language(file): class UDPipeModels: - server_url = "http://file.biolab.si/files/udpipe/" + server_url = "https://file.biolab.si/files/udpipe/" def __init__(self): self.local_data = os.path.join(data_dir(versioned=False), 'udpipe/') diff --git a/orangecontrib/text/widgets/owtweetprofiler.py b/orangecontrib/text/widgets/owtweetprofiler.py index 5a32f726c..182bd6bd1 100644 --- a/orangecontrib/text/widgets/owtweetprofiler.py +++ b/orangecontrib/text/widgets/owtweetprofiler.py @@ -1,3 +1,5 @@ +import logging + import numpy as np from AnyQt.QtWidgets import QApplication, QGridLayout, QLabel, QGroupBox, \ @@ -16,7 +18,7 @@ def run_profiler(profiler, corpus, meta_var, model_name, output_mode, state): ticks = iter(np.linspace(0., 100., - np.ceil(len(corpus) / profiler.BATCH_SIZE))) + int(np.ceil(len(corpus) / profiler.BATCH_SIZE)))) def advance(): if state.is_interruption_requested(): @@ -169,6 +171,8 @@ def on_partial_result(self, result): self.cancel() def on_exception(self, ex): + log = logging.getLogger(__name__) + log.debug("Unexpected error", exc_info=ex) self.Error.unexpected_error(type(ex).__name__) self.cancel()