Closed XinQi7788 closed 3 years ago
Hi @XinQi7788! thank you for reporting this issue. It appears to be something to do with importing of an scikit-learn model and its potential interaction with python 3.8. Are you able to use python 3.6 - if so, can you try run it under python 3.6?
Can you try add the -old
flag while trying e.g. visualqc_freesurfer -old -h
?
Hi Raamana: The issue is resolved after using python 3.6!!! Thank you so much for a quick reply!
Very glad to hear that. Please feel free to let me know if you have any feedback or feature requests.
Let me look into what is it about python 3.8 & sklearn that's causing the issue
I created a conda environment with python=3.6 for VisualQC, then install it using setup.py code. Now it seems work fine on AWS EC2 except it is slow maybe due to internet speed.
Actually, without adding -old flag, it works fine as well.
Thank you very much for so quick reply!
You're welcome. Thanks Xin for the notes - I am curious how well the GUI based apps run in AWS EC2? Probably not very different from local desktop except for slow startup etc?
Let me if your specific application requires any further customization or additional features.
It is no difference from local laptop or AWS EC2. But the EC2 is very slow to run visualqc to view the images one-by-one.
Thank you very much for your reply and we would like to let you know any additional features as needed!
Description and What I did
I installed VisualQC on my AWS EC2.
When I tried to test it in terminal by using command line: visualqc_freesurfer -h, got error saying Type Error: an integer is required (got type bytes)
Below is the detailed error information.
/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp Traceback (most recent call last): File "/home/Xin/miniconda3/bin/visualqc_freesurfer", line 33, in
sys.exit(load_entry_point('visualqc==0.5+1.g8e386c1', 'console_scripts', 'visualqc_freesurfer')())
File "/home/Xin/miniconda3/bin/visualqc_freesurfer", line 25, in importlib_load_entry_point
return next(matches).load()
File "/home/Xin/miniconda3/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/home/Xin/miniconda3/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/Xin/miniconda3/lib/python3.8/site-packages/visualqc/init.py", line 16, in
from visualqc.outliers import outlier_advisory
File "/home/Xin/miniconda3/lib/python3.8/site-packages/visualqc/outliers.py", line 14, in
from sklearn.ensemble import IsolationForest
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/init.py", line 64, in
from .base import clone
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/base.py", line 13, in
from .utils.fixes import signature
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/utils/init.py", line 13, in
from .validation import (as_float_array,
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/utils/validation.py", line 27, in
from ..utils._joblib import Memory
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/utils/_joblib.py", line 18, in
from ..externals.joblib import all # noqa
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/init.py", line 119, in
from .parallel import Parallel
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/parallel.py", line 32, in
from .externals.cloudpickle import dumps, loads
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/init.py", line 3, in
from .cloudpickle import *
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 151, in
_cell_set_template_code = _make_cell_set_template_code()
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 132, in _make_cell_set_template_code
return types.CodeType(
TypeError: an integer is required (got type bytes)