Skip to content

Failed to import some python std libs(e.g. json) in python code and then called in go code #3

Open
@corona10

Description

@corona10

Issue from google#408

def feature1(inputJsonString):
    print inputJsonString
    import json
    import sys
    print json.dumps(1)
    return sys.version

feature1({'s': 3})

Expected:

{'s': 3}
1

Got:

{'s': 3}
Traceback (most recent call last):
  File "/Users/grumpy.git/__main__.py", line 8, in <module>
  File "/Users/grumpy.git/__main__.py", line 3, in feature1
  File "/Users/grumpy.git/grumpy-runtime-src/build/src/__python__/json/__init__.py", line 110, in <module>
  File "/Users/grumpy.git/grumpy-runtime-src/build/src/__python__/json/decoder.py", line 25, in <module>
  File "/Users/grumpy.git/grumpy-runtime-src/build/src/__python__/json/decoder.py", line 23, in _floatconstants
TypeError: bad operand type for unary -: 'tuple'
exit status 1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions