[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123077=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123077 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 22:40 Start Date: 13/Jul/18 22:40 Worklog Time Spent: 10m Work Description: aaltay closed pull request #5949: [BEAM-4752] Add dill compatibility for older versions of dill URL: https://github.com/apache/beam/pull/5949 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/sdks/python/apache_beam/internal/pickler.py b/sdks/python/apache_beam/internal/pickler.py index a4d20b9d043..211430bd60f 100644 --- a/sdks/python/apache_beam/internal/pickler.py +++ b/sdks/python/apache_beam/internal/pickler.py @@ -44,6 +44,12 @@ # TODO: Remove this once Beam depends on dill >= 0.2.8 if not getattr(dill, 'dill', None): dill.dill = dill._dill + sys.modules['dill.dill'] = dill._dill + +# TODO: Remove once Dataflow has containers with a preinstalled dill >= 0.2.8 +if not getattr(dill, '_dill', None): + dill._dill = dill.dill + sys.modules['dill._dill'] = dill.dill def _is_nested_class(cls): This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123077) Time Spent: 3h 20m (was: 3h 10m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 3h 20m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123060=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123060 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 21:58 Start Date: 13/Jul/18 21:58 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5949: [BEAM-4752] Add dill compatibility for older versions of dill URL: https://github.com/apache/beam/pull/5949#issuecomment-404964520 Run Python PostCommit This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123060) Time Spent: 3h 10m (was: 3h) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123022=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123022 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 20:00 Start Date: 13/Jul/18 20:00 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946#issuecomment-404938388 @alanmyrvold It seems like 0.2.8 produces serialized data that is not compatible with 0.2.6 (https://issues.apache.org/jira/browse/BEAM-4785 to fix it. There are some blockers though.) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123022) Time Spent: 3h (was: 2h 50m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 3h > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123019=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123019 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 19:57 Start Date: 13/Jul/18 19:57 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946#issuecomment-404937789 Closing this, because https://github.com/apache/beam/pull/5949 has a fix for the issue. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123019) Time Spent: 2h 40m (was: 2.5h) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 2h 40m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123018=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123018 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 19:57 Start Date: 13/Jul/18 19:57 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5949: [BEAM-4752] Add dill compatibility for older versions of dill URL: https://github.com/apache/beam/pull/5949#issuecomment-404937677 Run Python PostCommit This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123018) Time Spent: 2.5h (was: 2h 20m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 2.5h > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123020=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123020 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 19:57 Start Date: 13/Jul/18 19:57 Worklog Time Spent: 10m Work Description: aaltay closed pull request #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123020) Time Spent: 2h 50m (was: 2h 40m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 2h 50m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123017=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123017 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 19:56 Start Date: 13/Jul/18 19:56 Worklog Time Spent: 10m Work Description: aaltay opened a new pull request #5949: [BEAM-4752] Add dill compatibility for older versions of dill URL: https://github.com/apache/beam/pull/5949 Fixing the post commit issue related to older dill version. R: @charlesccychen Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). It will help us expedite review of your Pull Request if you tag someone (e.g. `@username`) to look at it. Post-Commit Tests Status (on master branch) Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark --- | --- | --- | --- | --- | --- | --- | --- Go | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/) | --- | --- | --- | --- | --- | --- Java | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/) Python | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/) | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/) [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/) | --- | --- | --- | --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123017) Time Spent: 2h 20m (was: 2h 10m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123008=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123008 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 19:26 Start Date: 13/Jul/18 19:26 Worklog Time Spent: 10m Work Description: alanmyrvold commented on issue #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946#issuecomment-404930508 The dockerfile is currently pinning the version to 0.2.6 https://github.com/apache/beam/blob/c14c975224af417dcdc74fed8b0d893be742e9d7/sdks/python/container/Dockerfile#L47 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123008) Time Spent: 2h 10m (was: 2h) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 2h 10m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123007=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123007 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 19:18 Start Date: 13/Jul/18 19:18 Worklog Time Spent: 10m Work Description: charlesccychen edited a comment on issue #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946#issuecomment-404925443 Looked at this a bit more and my guess is that the version of dill differs from job submission (latest, 0.2.8) and on the SDK harness when deserializing (0.2.6). So at submission time, the pickled output references `dill._dill`, but when run on the SDK harness, this isn't defined since it uses the old version. So maybe the safe thing to do is to add a similar branch that also populates `dill._dill` if it isn't there. (Hopefully we can remove that once we converge to >=0.2.8) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123007) Time Spent: 2h (was: 1h 50m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 2h > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123002=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123002 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 19:06 Start Date: 13/Jul/18 19:06 Worklog Time Spent: 10m Work Description: charlesccychen commented on issue #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946#issuecomment-404925443 Looked at this a bit more and my guess is that the version of dill differs from job submission (latest, 0.2.8) and on the SDK harness when deserializing (0.2.6). So at submission time, the pickled output references `dill._dill`, but when run on the SDK harness, this isn't defined since it uses the old version. So maybe the safe thing to do is to add a similar branch that also populates `dill._dill` if it isn't there. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123002) Time Spent: 1h 50m (was: 1h 40m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=123000=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-123000 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 18:59 Start Date: 13/Jul/18 18:59 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946#issuecomment-404923617 > Thanks, LGTM. I don't quite understand how the change breaks the SDK harness though: I do not understand yet either. I will investigate this afternoon. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 123000) Time Spent: 1h 40m (was: 1.5h) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 1h 40m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122999=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122999 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 18:58 Start Date: 13/Jul/18 18:58 Worklog Time Spent: 10m Work Description: charlesccychen commented on issue #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946#issuecomment-404923467 Thanks, LGTM. I don't quite understand how the change breaks the SDK harness though: ``` DataflowRuntimeException: Dataflow pipeline failed. State: FAILED, Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Error received from SDK harness for instruction -83: Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 134, in _execute response = task() File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 169, in self._execute(lambda: worker.do_instruction(work), work) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 215, in do_instruction request.instruction_id) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker.py", line 234, in process_bundle self.data_channel_factory) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 230, in __init__ self.ops = self.create_execution_tree(self.process_bundle_descriptor) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 272, in create_execution_tree descriptor.transforms, key=topological_height, reverse=True)]) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 207, in wrapper result = cache[args] = func(*args) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 255, in get_operation in descriptor.transforms[transform_id].outputs.items() File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 254, in for tag, pcoll_id File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 207, in wrapper result = cache[args] = func(*args) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 255, in get_operation in descriptor.transforms[transform_id].outputs.items() File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 254, in for tag, pcoll_id File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 207, in wrapper result = cache[args] = func(*args) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 258, in get_operation transform_id, transform_consumers) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 362, in create_operation return creator(self, transform_id, transform_proto, payload, consumers) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 499, in create serialized_fn, parameter.side_inputs) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/bundle_processor.py", line 537, in _create_pardo_operation dofn_data = pickler.loads(serialized_fn) File "/usr/local/lib/python2.7/site-packages/apache_beam/internal/pickler.py", line 238, in loads return dill.loads(s) File "/usr/local/lib/python2.7/site-packages/dill/dill.py", line 277, in loads return load(file) File "/usr/local/lib/python2.7/site-packages/dill/dill.py", line 266, in load obj = pik.load() File "/usr/local/lib/python2.7/pickle.py", line 864, in load dispatch[key](self) File "/usr/local/lib/python2.7/pickle.py", line 1096, in load_global klass = self.find_class(module, name) File "/usr/local/lib/python2.7/site-packages/dill/dill.py", line 423, in find_class return StockUnpickler.find_class(self, module, name) File "/usr/local/lib/python2.7/pickle.py", line 1130, in find_class __import__(module) ImportError: No module named _dill ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122997=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122997 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 18:54 Start Date: 13/Jul/18 18:54 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5931: [BEAM-4752] Add support for newer dill dependency URL: https://github.com/apache/beam/pull/5931#issuecomment-404922377 Thank you @alanmyrvold. Sent https://github.com/apache/beam/pull/5946 to rollback. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122997) Time Spent: 1h 20m (was: 1h 10m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 1h 20m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122996=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122996 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 18:54 Start Date: 13/Jul/18 18:54 Worklog Time Spent: 10m Work Description: aaltay opened a new pull request #5946: Revert "[BEAM-4752] Add support for newer dill dependency" URL: https://github.com/apache/beam/pull/5946 Reverts apache/beam#5931 R: @alanmyrvold Breaks post commit tests: https://builds.apache.org/job/beam_PostCommit_Py_ValCont/228/console This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122996) Time Spent: 1h 10m (was: 1h) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122995=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122995 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 18:42 Start Date: 13/Jul/18 18:42 Worklog Time Spent: 10m Work Description: alanmyrvold commented on issue #5931: [BEAM-4752] Add support for newer dill dependency URL: https://github.com/apache/beam/pull/5931#issuecomment-404919223 I see a test error in https://builds.apache.org/job/beam_PostCommit_Py_ValCont/228 Dataflow logs contain error "No module named _dill" Could not load main session: Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker_main.py", line 125, in main _load_main_session(semi_persistent_directory) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker_main.py", line 190, in _load_main_session pickler.load_session(session_file) File "/usr/local/lib/python2.7/site-packages/apache_beam/internal/pickler.py", line 260, in load_session return dill.load_session(file_path) File "/usr/local/lib/python2.7/site-packages/dill/dill.py", line 363, in load_session module = unpickler.load() File "/usr/local/lib/python2.7/pickle.py", line 864, in load dispatch[key](self) File "/usr/local/lib/python2.7/pickle.py", line 1096, in load_global klass = self.find_class(module, name) File "/usr/local/lib/python2.7/site-packages/dill/dill.py", line 423, in find_class return StockUnpickler.find_class(self, module, name) File "/usr/local/lib/python2.7/pickle.py", line 1130, in find_class __import__(module) ImportError: No module named _dill Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker_main.py", line 125, in main _load_main_session(semi_persistent_directory) File "/usr/local/lib/python2.7/site-packages/apache_beam/runners/worker/sdk_worker_main.py", line 190, in _load_main_session pickler.load_session(session_file) File "/usr/local/lib/python2.7/site-packages/apache_beam/internal/pickler.py", line 260, in load_session return dill.load_session(file_path) File "/usr/local/lib/python2.7/site-packages/dill/dill.py", line 363, in load_session module = unpickler.load() File "/usr/local/lib/python2.7/pickle.py", line 864, in load dispatch[key](self) File "/usr/local/lib/python2.7/pickle.py", line 1096, in load_global klass = self.find_class(module, name) File "/usr/local/lib/python2.7/site-packages/dill/dill.py", line 423, in find_class return StockUnpickler.find_class(self, module, name) File "/usr/local/lib/python2.7/pickle.py", line 1130, in find_class __import__(module) ImportError: No module named _dill This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122995) Time Spent: 1h (was: 50m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 1h > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122917=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122917 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 15:52 Start Date: 13/Jul/18 15:52 Worklog Time Spent: 10m Work Description: aaltay closed pull request #5931: [BEAM-4752] Add support for newer dill dependency URL: https://github.com/apache/beam/pull/5931 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/sdks/python/apache_beam/internal/pickler.py b/sdks/python/apache_beam/internal/pickler.py index 3a04d8c36bf..a4d20b9d043 100644 --- a/sdks/python/apache_beam/internal/pickler.py +++ b/sdks/python/apache_beam/internal/pickler.py @@ -39,6 +39,12 @@ import dill +# Dill 0.28.0 renamed dill.dill to dill._dill: +# https://github.com/uqfoundation/dill/commit/f0972ecc7a41d0b8acada6042d557068cac69baa +# TODO: Remove this once Beam depends on dill >= 0.2.8 +if not getattr(dill, 'dill', None): + dill.dill = dill._dill + def _is_nested_class(cls): """Returns true if argument is a class object that appears to be nested.""" diff --git a/sdks/python/setup.py b/sdks/python/setup.py index 110228a994c..46c80500a17 100644 --- a/sdks/python/setup.py +++ b/sdks/python/setup.py @@ -97,7 +97,7 @@ def get_version(): REQUIRED_PACKAGES = [ 'avro>=1.8.1,<2.0.0', 'crcmod>=1.7,<2.0', -'dill==0.2.6', +'dill>=0.2.6,<=0.2.8.2', 'grpcio>=1.8,<2', 'hdfs>=2.1.0,<3.0.0', 'httplib2>=0.8,<=0.11.3', This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122917) Time Spent: 50m (was: 40m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 50m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122590=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122590 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 01:29 Start Date: 13/Jul/18 01:29 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5931: [BEAM-4752] Add support for newer dill dependency URL: https://github.com/apache/beam/pull/5931#issuecomment-404698443 retest this please This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122590) Time Spent: 40m (was: 0.5h) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 40m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122589=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122589 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 13/Jul/18 01:28 Start Date: 13/Jul/18 01:28 Worklog Time Spent: 10m Work Description: aaltay commented on issue #5931: [BEAM-4752] Add support for newer dill dependency URL: https://github.com/apache/beam/pull/5931#issuecomment-404698430 There are rat errors with unlicensed files, but this PR does not add any new files. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122589) Time Spent: 0.5h (was: 20m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122027=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122027 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 11/Jul/18 19:35 Start Date: 11/Jul/18 19:35 Worklog Time Spent: 10m Work Description: charlesccychen commented on a change in pull request #5931: [BEAM-4752] Add support for newer dill dependency URL: https://github.com/apache/beam/pull/5931#discussion_r201814701 ## File path: sdks/python/apache_beam/internal/pickler.py ## @@ -40,6 +40,13 @@ import dill +# Dill 0.28.0 renamed dill.dill to dill._dill: +# https://github.com/uqfoundation/dill/commit/f0972ecc7a41d0b8acada6042d557068cac69baa +# TODO: Remove this once Beam depends on dill >= 0.28 +if not hasattr(dill, 'dill'): Review comment: Can you use getattr is not None instead? (See https://hynek.me/articles/hasattr/) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122027) Time Spent: 20m (was: 10m) > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >Assignee: Ahmet Altay >Priority: Major > Fix For: 2.4.0 > > Time Spent: 20m > Remaining Estimate: 0h > > I'm seeing the following error (stack trace below). I looked at the module > structure of the {{dill}} library, and it does not have a {{dill}} submodule > (although it *does* have a {{_dill}} submodule). I think the correct way to > reference {{Pickler}} is simply {{dill.Pickler.}} > {noformat} > Traceback (most recent call last): > File "script/beam_run_model.py", line 29, in > import apache_beam as beam > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/__init__.py", > line 84, in > import apache_beam.internal.pickler > File > "/usr/local/pyenv/versions/2.7.13/lib/python2.7/site-packages/apache_beam/internal/pickler.py", > line 107, in > dill.dill.Pickler.dispatch[type]) > AttributeError: 'module' object has no attribute 'dill'{noformat} > Oddly, I have successfully used Beam 2.4.0 in the past with this version of > Dill. ¯_(ツ)_/¯ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-4752) Import error in apache_beam.internal.pickler: "'module' object has no attribute 'dill'"
[ https://issues.apache.org/jira/browse/BEAM-4752?focusedWorklogId=122026=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-122026 ] ASF GitHub Bot logged work on BEAM-4752: Author: ASF GitHub Bot Created on: 11/Jul/18 19:26 Start Date: 11/Jul/18 19:26 Worklog Time Spent: 10m Work Description: aaltay opened a new pull request #5931: [BEAM-4752] Add support for newer dill dependency URL: https://github.com/apache/beam/pull/5931 **Please** add a meaningful description for your change here Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). It will help us expedite review of your Pull Request if you tag someone (e.g. `@username`) to look at it. Post-Commit Tests Status (on master branch) Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark --- | --- | --- | --- | --- | --- | --- | --- Go | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/) | --- | --- | --- | --- | --- | --- Java | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/) Python | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/) | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/) [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/) | --- | --- | --- | --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 122026) Time Spent: 10m Remaining Estimate: 0h > Import error in apache_beam.internal.pickler: "'module' object has no > attribute 'dill'" > --- > > Key: BEAM-4752 > URL: https://issues.apache.org/jira/browse/BEAM-4752 > Project: Beam > Issue Type: Bug > Components: sdk-py-core >Affects Versions: 2.4.0 > Environment: CentOS Linux release 7.4.1708 > Python 2.7.13 >Reporter: Barry Hart >