akaraspt / deepsleepnet

DeepSleepNet: a Model for Automatic Sleep Stage Scoring based on Raw Single-Channel EEG
Apache License 2.0
398 stars 153 forks source link

error in reading edf files #4

Closed bhralzz closed 7 years ago

bhralzz commented 7 years ago

Dear all, an error occured while reading edf files as below:

dhedfreader.py", line 32, in annotation_to_list return unicode(annotation, 'utf-8').split('\x14') if annotation else [] NameError: name 'unicode' is not defined

as I searched this error based on that the code is on python 2 whereas I use python 3. please provide python 3 version of the code. thanks

akaraspt commented 7 years ago

Thanks for your interests in our paper.

Currently, we don’t have plan to extend or modify our code to support Python 3. The quickest way for you to try our code is to install a Python virtual environment. With the virtual environment, you can install different Python version for different projects that you have. This can also prevent you from messing your current installation of Python 3.

I would suggest you to use Miniconda to create the Python virtual environment: https://conda.io/miniconda.html

Once you virtual environment is activated (you will see the name of your environment in front of the command line in Terminal), you can proceed the installation as usual.

Hope this help.