Uploaded image for project: ' Swift for TensorFlow'
  1. Swift for TensorFlow
  2. TF-361

Python member lookup error gives bad error message.

    XMLWordPrintable

    Details

      Description

      import Python
      let a = Python.object()
      a.hmm = a
      print(a)
      

      Crashes with:

      Fatal error: Python error state must be clear: file /Users/danielzheng/swift-build/swift/stdlib/public/Python/Python.swift, line 292
      Stack dump:
      0.	Program arguments: /Users/danielzheng/swift-build/build/Ninja-ReleaseAssert+stdlib-Release/swift-macosx-x86_64/bin/swift -frontend -interpret tf-361.swift -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -color-diagnostics -module-name main
      [1]    75166 illegal hardware instruction  $SWIFT_BIN/swift tf-361.swift
      

      The assertion is triggered in PythonObject.dynamicallyCall(withArguments because PyErr_Occurred is not nil, meaning that there's some PythonObject operation that produces an unhandled error.

        Attachments

          Activity

            People

            Assignee:
            realdoug Doug Friedman
            Reporter:
            pschuh Parker Schuh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: