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

Valentyn Tymofieiev edited comment on BEAM-5776 at 10/18/18 1:27 AM:
---------------------------------------------------------------------

Traceback (most recent call last):
  File "/usr/lib/python3.5/inspect.py", line 1088, in getfullargspec
    sigcls=Signature)
  File "/usr/lib/python3.5/inspect.py", line 2231, in _signature_from_callable
    skip_bound_arg=skip_bound_arg)
  File "/usr/lib/python3.5/inspect.py", line 2061, in _signature_from_builtin
    raise ValueError("no signature found for builtin {!r}".format(func))
ValueError: no signature found for builtin <method 'upper' of 'str' objects>
Traceback (most recent call last):
  File 
"/home/valentyn/projects/beam/py3/beam/sdks/python/apache_beam/typehints/decorators.py",
 line 268, in getcallargs_forhints
    callargs = inspect.getcallargs(func, *packed_typeargs, **typekwargs)
  File "/usr/lib/python3.5/inspect.py", line 1284, in getcallargs
    spec = getfullargspec(func)
  File "/usr/lib/python3.5/inspect.py", line 1094, in getfullargspec
    raise TypeError('unsupported callable') from ex
TypeError: unsupported callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File
    result = pcol | 'Map' >> beam.Map(str.upper)
  File 
"/home/valentyn/projects/beam/py3/beam/sdks/python/apache_beam/pvalue.py", line 
111, in __or__
    return self.pipeline.apply(ptransform, self)
  File 
"/home/valentyn/projects/beam/py3/beam/sdks/python/apache_beam/pipeline.py", 
line 467, in apply
    label or transform.label)
  File 
"/home/valentyn/projects/beam/py3/beam/sdks/python/apache_beam/pipeline.py", 
line 477, in apply
    return self.apply(transform, pvalueish)
  File 
"/home/valentyn/projects/beam/py3/beam/sdks/python/apache_beam/pipeline.py", 
line 511, in apply
    transform.type_check_inputs(pvalueish)
  File 
"/home/valentyn/projects/beam/py3/beam/sdks/python/apache_beam/transforms/ptransform.py",
 line 702, in type_check_inputs
    bindings = getcallargs_forhints(argspec_fn, *arg_types, **kwargs_types)
  File 
"/home/valentyn/projects/beam/py3/beam/sdks/python/apache_beam/typehints/decorators.py",
 line 270, in getcallargs_forhints
    raise TypeCheckError(e)
apache_beam.typehints.decorators.TypeCheckError: unsupported callable
:~$ 




was (Author: tvalentyn):
Traceback (most recent call last):
  File "/usr/lib/python3.5/inspect.py", line 1088, in getfullargspec
    sigcls=Signature)
  File "/usr/lib/python3.5/inspect.py", line 2231, in _signature_from_callable
    skip_bound_arg=skip_bound_arg)
  File "/usr/lib/python3.5/inspect.py", line 2061, in _signature_from_builtin
    raise ValueError("no signature found for builtin {!r}".format(func))
ValueError: no signature found for builtin <method 'upper' of 'str' objects>


> Using methods in map is broken on Python 3
> ------------------------------------------
>
>                 Key: BEAM-5776
>                 URL: https://issues.apache.org/jira/browse/BEAM-5776
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Robert Bradshaw
>            Assignee: Valentyn Tymofieiev
>            Priority: Major
>
> E.g. 
> {code:java}
> pcoll | beam.Map(str.upper){code}
> no longer works.



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

Reply via email to