[ 
https://issues.apache.org/jira/browse/BEAM-5627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16778078#comment-16778078
 ] 

Valentyn Tymofieiev commented on BEAM-5627:
-------------------------------------------

[~Juta], I still see these warnings, see below. I reproduced them on my linux 
laptop with Python 3.5.4, as well as inside a Docker container running 3.5.6 
following the setup described in  
[https://s.apache.org/beam-py3-conversion-quick-start].

 
{noformat}
root@dcede076914f:/beam/sdks/python# python ./setup.py test -s 
apache_beam.io.source_test_utils_test.SourceTestUtilsTest.test_split_at_fraction_exhaustive
./setup.py:174: UserWarning: Python 3 support for the Apache Beam SDK is not 
yet fully supported. You may encounter buggy behavior or missing features.
 'Python 3 support for the Apache Beam SDK is not yet fully supported. '
/usr/local/lib/python3.5/site-packages/setuptools/dist.py:470: UserWarning: 
Normalizing '2.12.0.dev' to '2.12.0.dev0'
 normalized_version,
running test
/beam/sdks/python/gen_protos.py:52: UserWarning: Installing grpcio-tools is 
recommended for development.
 warnings.warn('Installing grpcio-tools is recommended for development.')
running egg_info
/beam/sdks/python/gen_protos.py:52: UserWarning: Installing grpcio-tools is 
recommended for development.
 warnings.warn('Installing grpcio-tools is recommended for development.')
writing dependency_links to apache_beam.egg-info/dependency_links.txt
writing apache_beam.egg-info/PKG-INFO
writing entry points to apache_beam.egg-info/entry_points.txt
writing requirements to apache_beam.egg-info/requires.txt
writing top-level names to apache_beam.egg-info/top_level.txt
reading manifest file 'apache_beam.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.md'
warning: no files found matching 'NOTICE'
warning: no files found matching 'LICENSE'
writing manifest file 'apache_beam.egg-info/SOURCES.txt'
running build_ext
/beam/sdks/python/apache_beam/__init__.py:84: UserWarning: Running the Apache 
Beam SDK on Python 3 is not yet fully supported. You may encounter buggy 
behavior or missing features.
 'Running the Apache Beam SDK on Python 3 is not yet fully supported. '
test_split_at_fraction_exhaustive 
(apache_beam.io.source_test_utils_test.SourceTestUtilsTest) ... 
/beam/sdks/python/apache_beam/io/source_test_utils.py:596: DeprecationWarning: 
The 'warn' function is deprecated, use 'warning' instead
 'success' if have_success else 'failure'
WARNING:root:After 101 concurrent splitting trials at item #1, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #2, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #3, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #4, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #5, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #6, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #7, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #8, observed only 
failure, giving up on this item
WARNING:root:After 101 concurrent splitting trials at item #9, observed only 
failure, giving up on this item
ok{noformat}

> Investigate why test_split_at_fraction_exhaustive consistently fails to split 
> after 101 attempts on Python 3
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: BEAM-5627
>                 URL: https://issues.apache.org/jira/browse/BEAM-5627
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Juta Staes
>            Priority: Minor
>              Labels: triaged
>             Fix For: Not applicable
>
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> ERROR: test_split_at_fraction_exhaustive 
> (apache_beam.io.source_test_utils_test.SourceTestUtilsTest)
>  ----------------------------------------------------------------------
>  Traceback (most recent call last):
>    File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/io/source_test_utils_test.py",
>  line 120, in test_split_at_fraction_exhaustive
>      source = self._create_source(data)
>    File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/io/source_test_utils_test.py",
>  line 43, in _create_source
>      source = LineSource(self._create_file_with_data(data))
>    File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/io/source_test_utils_test.py",
>  line 35, in _create_file_with_data
>      f.write(line + '\n')
>    File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/target/.tox/py3/lib/python3.5/tempfile.py",
>  line 622, in func_wrapper
>      return func(*args, **kwargs)
> TypeError: a bytes-like object is required, not 'str'
> Also similar:
> ======================================================================
>  ERROR: test_file_sink_writing 
> (apache_beam.io.filebasedsink_test.TestFileBasedSink)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/   
>        apache_beam/io/filebasedsink_test.py", line 121, in 
> test_file_sink_writing
>       init_token, writer_results = self._common_init(sink)
>     File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/   
>        apache_beam/io/filebasedsink_test.py", line 103, in _common_init
>       writer1 = sink.open_writer(init_token, '1')
>     File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/   
>        apache_beam/options/value_provider.py", line 133, in _f
>       return fnc(self, *args, **kwargs)
>     File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/   
>        apache_beam/io/filebasedsink.py", line 185, in open_writer
>     return FileBasedSinkWriter(self, os.path.join(init_result, uid) + suffix)
>     File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/   
>        apache_beam/io/filebasedsink.py", line 385, in __init__
>       self.temp_handle = self.sink.open(temp_shard_path)
>     File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/   
>        apache_beam/io/filebasedsink_test.py", line 82, in open
>       file_handle.write('[start]')
>   TypeError: a bytes-like object is required, not 'str'



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to