TresAmigosSD / SMV

Spark Modularized View
Apache License 2.0
42 stars 22 forks source link

requiresLib on c-base library error out #1525

Closed ninjapapa closed 5 years ago

ninjapapa commented 5 years ago

Code:

class WithLib(SmvModule):
    def requiresDS(self):
        return [M2]
    def requiresLib(self):
        return [time]
    def run(self, i):
        return i[M2]

Error:

...
  File "/Users/bozhang/DSA/SMV-2.3/src/main/python/smv/utils.py", line 29,in _lazy_property
    setattr(self, attr_name, fn(self))
  File "/Users/bozhang/DSA/SMV-2.3/src/main/python/smv/smvgenericmodule.py", line 491, in hash_of_hash
    _dataset_hash = self.dataset_hash()
  File "/Users/bozhang/DSA/SMV-2.3/src/main/python/smv/smvgenericmodule.py", line 476, in dataset_hash
    _sourceCodeHash = self.sourceCodeHash()
  File "/Users/bozhang/DSA/SMV-2.3/src/main/python/smv/smvgenericmodule.py", line 711, in sourceCodeHash
    lib_src_hash = _sourceHash(lib)
  File "/Users/bozhang/DSA/SMV-2.3/src/main/python/smv/smvgenericmodule.py", line 38, in _sourceHash
    src = inspect.getsource(module)
  File "/Users/bozhang/.pyenv/versions/2.7.13/lib/python2.7/inspect.py", line 700, in getsource
    lines, lnum = getsourcelines(object)
  File "/Users/bozhang/.pyenv/versions/2.7.13/lib/python2.7/inspect.py", line 689, in getsourcelines
    lines, lnum = findsource(object)
  File "/Users/bozhang/.pyenv/versions/2.7.13/lib/python2.7/inspect.py", line 528, in findsource
    raise IOError('source code not available')
IOError: source code not available