Exception: call stack is not deep enough

216 views
Skip to first unread message

Sascha Schramm

unread,
May 24, 2018, 3:40:22 PM5/24/18
to Swift for TensorFlow
When I'm trying to import the python module absl.flags the exception "call stack is not deep enough" is thrown.    

My code:  
let sys = Python.import("sys")  
sys.path.insert.call(with: 0, "/usr/local/lib/python2.7/site-packages")  
let absl = Python.import("absl.flags")    

Any ideas on what I'm doing wrong? Thanks!    

Sascha

Dan Zheng

unread,
May 24, 2018, 5:44:27 PM5/24/18
to Sascha Schramm, Swift for TensorFlow
I'm able to reproduce this error.

pip install absl-py, then:

$ swift
Welcome to Swift version 4.2-dev (LLVM 04bdb56f3d, Clang b44dbbdf44, Swift aa19e11af7). Type :help for assistance.
  1> import Python
  2> let absl = Python.import("absl.flags")
Fatal error: 'try!' expression unexpectedly raised an error: exception: call stack is not deep enough: file /Library/Caches/swift-build/swift/stdlib/public/core/ErrorType.swift, line 184

A Google search for "call stack is not deep enough" returns quite a few results. JuliaPy implementers ran into a similar problem, seemingly related to frame objects. I'll file a bug and look into this later.

Dan

--
You received this message because you are subscribed to the Google Groups "Swift for TensorFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swift+unsubscribe@tensorflow.org.

Reply all
Reply to author
Forward
0 new messages