# Binder gives error with master reverted to prior commit, but no error with prior commit

**URL:** <https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962>\
**Category:** General\
**Created:** [December 1, 2020, 7:32am UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962 "2020-12-01T07:32:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dale](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dale](https://discourse.jupyter.org/u/dale)\
**Post date:** [December 1, 2020, 7:32am UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962/1 "2020-12-01T07:32:35Z")

</div>

Hi,

Thanks in advance for any thoughts on this problem.

I’ve been using Binder for months without issue, launching from the [master repo](https://mybinder.org/v2/gh/dalejn/cleanBib/master).

Today, we noticed after launching the Binder with new commits that a new error was introduced while running Jupyter Notebook. This error does not seem to be caused by any changes to our code, because reverting the master repo back to a prior commit that worked still gives us the new error, whereas [launching Binder from that specific commit](https://mybinder.org/v2/gh/dalejn/cleanBib/fde08d31b90cba48e42fb2cccf4695b725048eea) does not give us the error. Moreover, within the Binder instance launched from the prior commit, I could successfully run the new code after uploading it to the environment.

The error we see only in the Binder built from the master repo is from using a function in the ethnicolr package:  
AttributeError: ‘str’ object has no attribute ‘decode’

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [December 1, 2020, 6:39pm UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962/2 "2020-12-01T18:39:54Z")

</div>

It sounds like [this](https://stackoverflow.com/a/28583969/8508004) but is it somewhere you cannot remove the `decode` step?

What I think is happening is that when you are launching from your prior commit, you are getting the old build. The old build used something that didn’t trigger this new error. However, when you trigger a build with a new commit or rebuild with the old code, the environment in the current build is somehow different and you get the error.

I thought maybe your old commit would have an older version of the package `ethnicolr`; however, it looks like your version of the package `ethnicolr` is 0.4.0 in both launches so that isn’t it. (Unless I lost track while having multiple launches going.) Does your error refer to any other packages that `ethnicolr` depends on that perhaps changed since October?  
Or something changed since October in the defaults Binder installs that isn’t compatible with you old code? Your environment is rather complex and so this isn’t out of the realm of possibility.

---

<div class="post-metadata">

**Author:** ![dale](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dale](https://discourse.jupyter.org/u/dale)\
**Post date:** [December 1, 2020, 7:03pm UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962/3 "2020-12-01T19:03:30Z")

</div>

The `decode` step is within an `ethnicolr` function so not easily removed.

Here’s a list of all the things that are different from running `apt list` from each Binder environment and running `sdiff -s newAptList oldAptList`, new master on left, prior commit on right:

ca-certificates/now 20201027ubuntu0.18.04.1 all [installed,lo | ca-certificates/now 20190110~18.04.1 all [installed,local]  
distro-info-data/now 0.37ubuntu0.9 all [installed,local] | distro-info-data/now 0.37ubuntu0.7 all [installed,local]  
krb5-multidev/now 1.16-2ubuntu0.2 amd64 [installed,local] | krb5-multidev/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libc-bin/now 2.27-3ubuntu1.3 amd64 [installed,local] | libc-bin/now 2.27-3ubuntu1.2 amd64 [installed,local]  
libc-dev-bin/now 2.27-3ubuntu1.3 amd64 [installed,local] | libc-dev-bin/now 2.27-3ubuntu1.2 amd64 [installed,local]  
libc6/now 2.27-3ubuntu1.3 amd64 [installed,local] | libc6/now 2.27-3ubuntu1.2 amd64 [installed,local]  
libc6-dev/now 2.27-3ubuntu1.3 amd64 [installed,local] | libc6-dev/now 2.27-3ubuntu1.2 amd64 [installed,local]  
libc6-i386/now 2.27-3ubuntu1.3 amd64 [installed,local] | libc6-i386/now 2.27-3ubuntu1.2 amd64 [installed,local]  
libexif-dev/now 0.6.21-4ubuntu0.6 amd64 [installed,local] | libexif-dev/now 0.6.21-4ubuntu0.5 amd64 [installed,local]  
libexif12/now 0.6.21-4ubuntu0.6 amd64 [installed,local] | libexif12/now 0.6.21-4ubuntu0.5 amd64 [installed,local]  
libfreetype6/now 2.8.1-2ubuntu2.1 amd64 [installed,local] | libfreetype6/now 2.8.1-2ubuntu2 amd64 [installed,local]  
libfreetype6-dev/now 2.8.1-2ubuntu2.1 amd64 [installed,local] | libfreetype6-dev/now 2.8.1-2ubuntu2 amd64 [installed,local]  
libgssapi-krb5-2/now 1.16-2ubuntu0.2 amd64 [installed,local] | libgssapi-krb5-2/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libgssrpc4/now 1.16-2ubuntu0.2 amd64 [installed,local] | libgssrpc4/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libk5crypto3/now 1.16-2ubuntu0.2 amd64 [installed,local] | libk5crypto3/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libkadm5clnt-mit11/now 1.16-2ubuntu0.2 amd64 [installed,local | libkadm5clnt-mit11/now 1.16-2ubuntu0.1 amd64 [installed,local  
libkadm5srv-mit11/now 1.16-2ubuntu0.2 amd64 [installed,local] | libkadm5srv-mit11/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libkdb5-9/now 1.16-2ubuntu0.2 amd64 [installed,local] | libkdb5-9/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libkrb5-3/now 1.16-2ubuntu0.2 amd64 [installed,local] | libkrb5-3/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libkrb5-dev/now 1.16-2ubuntu0.2 amd64 [installed,local] | libkrb5-dev/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libkrb5support0/now 1.16-2ubuntu0.2 amd64 [installed,local] | libkrb5support0/now 1.16-2ubuntu0.1 amd64 [installed,local]  
libldap-2.4-2/now 2.4.45+dfsg-1ubuntu1.8 amd64 [installed,loc | libldap-2.4-2/now 2.4.45+dfsg-1ubuntu1.6 amd64 [installed,loc  
libldap-common/now 2.4.45+dfsg-1ubuntu1.8 all [installed,loca | libldap-common/now 2.4.45+dfsg-1ubuntu1.6 all [installed,loca  
libmysqlclient-dev/now 5.7.32-0ubuntu0.18.04.1 amd64 [install | libmysqlclient-dev/now 5.7.31-0ubuntu0.18.04.1 amd64 [install  
libmysqlclient20/now 5.7.32-0ubuntu0.18.04.1 amd64 [installed | libmysqlclient20/now 5.7.31-0ubuntu0.18.04.1 amd64 [installed  
libperl5.26/now 5.26.1-6ubuntu0.5 amd64 [installed,local] | libperl5.26/now 5.26.1-6ubuntu0.3 amd64 [installed,local]  
libpoppler73/now 0.62.0-2ubuntu2.12 amd64 [installed,local] | libpoppler73/now 0.62.0-2ubuntu2.10 amd64 [installed,local]  
libpq-dev/now 10.15-0ubuntu0.18.04.1 amd64 [installed,local] | libpq-dev/now 10.14-0ubuntu0.18.04.1 amd64 [installed,local]  
libpq5/now 10.15-0ubuntu0.18.04.1 amd64 [installed,local] | libpq5/now 10.14-0ubuntu0.18.04.1 amd64 [installed,local]  
libpython2.7-minimal/now 2.7.17-1~18.04ubuntu1.2 amd64 [insta | libpython2.7-minimal/now 2.7.17-1~18.04ubuntu1.1 amd64 [insta  
libpython2.7-stdlib/now 2.7.17-1~18.04ubuntu1.2 amd64 [instal | libpython2.7-stdlib/now 2.7.17-1~18.04ubuntu1.1 amd64 [instal  
libpython3.6-minimal/now 3.6.9-1~18.04ubuntu1.3 amd64 [instal | libpython3.6-minimal/now 3.6.9-1~18.04ubuntu1.1 amd64 [instal  
libpython3.6-stdlib/now 3.6.9-1~18.04ubuntu1.3 amd64 [install | libpython3.6-stdlib/now 3.6.9-1~18.04ubuntu1.1 amd64 [install  
libsystemd0/now 237-3ubuntu10.43 amd64 [installed,local] | libsystemd0/now 237-3ubuntu10.42 amd64 [installed,local]  
libudev1/now 237-3ubuntu10.43 amd64 [installed,local] | libudev1/now 237-3ubuntu10.42 amd64 [installed,local]  
linux-libc-dev/now 4.15.0-124.127 amd64 [installed,local] | linux-libc-dev/now 4.15.0-118.119 amd64 [installed,local]  
locales/now 2.27-3ubuntu1.3 all [installed,local] | locales/now 2.27-3ubuntu1.2 all [installed,local]  
multiarch-support/now 2.27-3ubuntu1.3 amd64 [installed,local] | multiarch-support/now 2.27-3ubuntu1.2 amd64 [installed,local]  
nodejs/now 14.15.1-1nodesource1 amd64 [installed,local] | nodejs/now 10.22.1-1nodesource1 amd64 [installed,local]  
perl/now 5.26.1-6ubuntu0.5 amd64 [installed,local] | perl/now 5.26.1-6ubuntu0.3 amd64 [installed,local]  
perl-base/now 5.26.1-6ubuntu0.5 amd64 [installed,local] | perl-base/now 5.26.1-6ubuntu0.3 amd64 [installed,local]  
perl-modules-5.26/now 5.26.1-6ubuntu0.5 all [installed,local] | perl-modules-5.26/now 5.26.1-6ubuntu0.3 all [installed,local]  
python2.7/now 2.7.17-1~18.04ubuntu1.2 amd64 [installed,local] | python2.7/now 2.7.17-1~18.04ubuntu1.1 amd64 [installed,local]  
python2.7-minimal/now 2.7.17-1~18.04ubuntu1.2 amd64 [installe | python2.7-minimal/now 2.7.17-1~18.04ubuntu1.1 amd64 [installe  
python3.6/now 3.6.9-1~18.04ubuntu1.3 amd64 [installed,local] | python3.6/now 3.6.9-1~18.04ubuntu1.1 amd64 [installed,local]  
python3.6-minimal/now 3.6.9-1~18.04ubuntu1.3 amd64 [installed | python3.6-minimal/now 3.6.9-1~18.04ubuntu1.1 amd64 [installed  
r-cran-codetools/now 0.2-18-1cran1.1804.0 all [installed,loca | r-cran-codetools/now 0.2-16-2.1804.0 all [installed,local]  
r-cran-kernsmooth/now 2.23-18-1.1804.0 amd64 [installed,local | r-cran-kernsmooth/now 2.23-17-1cran1.1804.0 amd64 [installed,  
r-cran-nlme/now 3.1.150-1.1804.0 amd64 [installed,local] | r-cran-nlme/now 3.1.149-1.1804.0 amd64 [installed,local]  
sudo/now 1.8.21p2-3ubuntu1.3 amd64 [installed,local] | sudo/now 1.8.21p2-3ubuntu1.2 amd64 [installed,local]  
tzdata/now 2020d-0ubuntu0.18.04 all [installed,local] | tzdata/now 2020a-0ubuntu0.18.04 all [installed,local]  
xdg-utils/now 1.1.2-1ubuntu2.4 all [installed,local] | xdg-utils/now 1.1.2-1ubuntu2.3 all [installed,local]

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [December 1, 2020, 7:24pm UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962/4 "2020-12-01T19:24:16Z")

</div>

What about comparing the results of `pip freeze` similarly?

---

<div class="post-metadata">

**Author:** ![dale](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dale](https://discourse.jupyter.org/u/dale)\
**Post date:** [December 1, 2020, 7:38pm UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962/5 "2020-12-01T19:38:10Z")

</div>

Here it is for `pip freeze` and `sdiff -s newPipFreeze oldPipFreeze`. Will try setting version requirements for some of these, like numpy, pandas, scipy, etc.

absl-py==0.11.0 | absl-py==0.10.0  
aiohttp==3.7.3 | aiohttp==3.6.3  
cached-property==1.5.2 \<  
google-auth==1.23.0 | google-auth==1.22.1  
google-auth-oauthlib==0.4.2 | google-auth-oauthlib==0.4.1  
grpcio==1.33.2 | grpcio==1.32.0  
h5py==3.1.0 | h5py==2.10.0  
kiwisolver==1.3.1 | kiwisolver==1.2.0  
Markdown==3.3.3 | Markdown==3.3.1  
multidict==5.0.2 | multidict==4.7.6  
numpy==1.19.4 | numpy==1.19.2  
pandas==1.1.4 | pandas==1.1.3  
Pillow==8.0.1 | Pillow==8.0.0  
protobuf==3.14.0 | protobuf==3.13.0  
pytz==2020.4 | pytz==2020.1  
scipy==1.5.4 | scipy==1.5.3  
tensorboard==2.4.0 | tensorboard==2.3.0  
yarl==1.6.3 | yarl==1.5.1

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [December 1, 2020, 8:03pm UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962/6 "2020-12-01T20:03:36Z")

</div>

That would be nice if the pinning in your `environment.yml` fixes it.

---

<div class="post-metadata">

**Author:** ![dale](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dale](https://discourse.jupyter.org/u/dale)\
**Post date:** [December 1, 2020, 10:29pm UTC](https://discourse.jupyter.org/t/binder-gives-error-with-master-reverted-to-prior-commit-but-no-error-with-prior-commit/6962/7 "2020-12-01T22:29:31Z")

</div>

Looks like that did it. Thanks for your help!
