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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VBN rc/2.13.5 branch - ImportError: cannot import name 'soft_unicode' from 'markupsafe' #2478

Closed
olsenshawn opened this issue Jun 16, 2022 · 2 comments
Assignees
Labels

Comments

@olsenshawn
Copy link

Describe the bug

Cannot import soft_unicode when trying to import VisualBehaviorNeuropixelsProjectCache

ImportError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 from allensdk.brain_observatory.behavior.behavior_project_cache import VisualBehaviorNeuropixelsProjectCache as cache_class

ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\shawno\Anaconda3\envs\allensdk_vbn_aws\lib\site-packages\markupsafe_init_.py)

To Reproduce

  1. I created a new conda environment:
    conda create --name allensdk_aws_test python=3.8. # create a new python 3.8 environment
    conda activate allensdk_aws_test # activate your new python 3.8 environment
    git clone …..clone the SDK…. # clone the SDK
    cd AllenSDK # cd into your SDK clone
    git checkout rc/2.13.5# checkout the development branch
    pip install -r requirements.txt # have pip install all the requirements
    pip install -e . # have pip install the SDK itself

  2. Added kernel to jupyter notebook
    conda install -c anaconda ipykernel
    python -m ipykernel install --user --name=allensdk_vbn_aws

  3. Tried to the following:
    from allensdk.brain_observatory.behavior.behavior_project_cache import VisualBehaviorNeuropixelsProjectCache as cache_class

Expected behavior
Should import cache_class

Actual Behavior
Got error:

ImportError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 from allensdk.brain_observatory.behavior.behavior_project_cache import VisualBehaviorNeuropixelsProjectCache as cache_class

ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\shawno\Anaconda3\envs\allensdk_vbn_aws\lib\site-packages\markupsafe_init_.py)

Environment (please complete the following information):
See above - did fresh install of AllenSDK and switched to rc/2.13.5 branch

@olsenshawn olsenshawn added the bug label Jun 16, 2022
@corbennett
Copy link
Contributor

I had the same problem. It seems that the SDK installation gives you markupsafe 2.1.1 by default. Switching to 2.0.1 fixed it for me.

@aamster
Copy link
Contributor

aamster commented Jun 21, 2022

@olsenshawn @corbennett this issue should be fixed in rc/2.13.5 now.

@aamster aamster closed this as completed Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants