[
https://issues.apache.org/jira/browse/CLIMATE-882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593401#comment-15593401
]
ASF GitHub Bot commented on CLIMATE-882:
----------------------------------------
GitHub user agoodm opened a pull request:
https://github.com/apache/climate/pull/414
CLIMATE-882 - local data source is not Python 3 compatible
With this PR, the main python 3 incompatibility issue in `local.py` is
fixed and we can now successfully finish the smoke tests on python 3. This will
now let us see precisely which parts of the ocw codebase are not python 3
compatible with each of our CI builds.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/agoodm/climate CLIMATE-882
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/climate/pull/414.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #414
----
commit 8cf223f2c704fe0f3e27bfe2288ccfd11324fd68
Author: Alex Goodman <[email protected]>
Date: 2016-10-20T22:25:24Z
CLIMATE-882 - local data source is not Python 3 compatible
----
> local data source is not Python 3 compatible
> --------------------------------------------
>
> Key: CLIMATE-882
> URL: https://issues.apache.org/jira/browse/CLIMATE-882
> Project: Apache Open Climate Workbench
> Issue Type: Bug
> Affects Versions: 1.1.0
> Reporter: Alex Goodman
> Assignee: Alex Goodman
> Fix For: 1.2.0
>
>
> Tests are failing for our python 3 builds because of the {{local}} module.
> Specifically, {{_get_netcdf_variable_name()}} raises an exception because
> Python 3 implicitly treats strings as unicode instead of bytes. The culprit
> is specifically this line:
> {code}
> dims_lower = [dim.encode().lower() for dim in dimensions]
> {code}
> Because {{encode()}} converts the strings to bytes in python 3.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)