Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDF 문의 #726

Open
admin0319 opened this issue Jan 28, 2020 · 0 comments
Open

UDF 문의 #726

admin0319 opened this issue Jan 28, 2020 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@admin0319
Copy link

admin0319 commented Jan 28, 2020

안녕하세요.

브라이틱스 최신버전으로 아래 파이썬 코드를 Python Script 로 실행하였을때는 정상적으로 결과가 나오는데 UDF 로 생성하면 다음과 같은 에러가 납니다.
확인 부탁드립니다.

UDF의 input은 이전 output이름과 일치하도록 하였습니다.

구동환경은 win10 64bit, python 3.6 입니다.

#Python Script
inputDataframe = inputs[0]

inputDataframe['concat_txt'] = (inputDataframe['title'] + inputDataframe['contents']).str.split(' ')

for i in inputDataframe.index:
val = inputDataframe.get_value(i, 'concat_txt')
inputDataframe.set_value(i, 'concat_txt', [x for x in val if x])

out_table = inputDataframe

image

#error log
JOB ID: c_JdpEzodxsbtN9iLM_202001281821570310
java.lang.Throwable: Traceback (most recent call last):
File "D:\BA\brightics-studio\lib\python\Lib\site-packages\pandas\core\indexes\base.py", line 3078, in get_loc
return self._engine.get_loc(key)
File "pandas_libs\index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\BA\brightics-studio\brightics-server\functions\python\brightics\brightics_python_runner.py", line 130, in _executer
exec(exec_code_object)
File "", line 2, in
File "D:\BA\brightics-studio\lib\python\Lib\site-packages\pandas\core\frame.py", line 2688, in getitem
return self._getitem_column(key)
File "D:\BA\brightics-studio\lib\python\Lib\site-packages\pandas\core\frame.py", line 2695, in _getitem_column
return self._get_item_cache(key)
File "D:\BA\brightics-studio\lib\python\Lib\site-packages\pandas\core\generic.py", line 2489, in _get_item_cache
values = self._data.get(item)
File "D:\BA\brightics-studio\lib\python\Lib\site-packages\pandas\core\internals.py", line 4115, in get
loc = self.items.get_loc(item)
File "D:\BA\brightics-studio\lib\python\Lib\site-packages\pandas\core\indexes\base.py", line 3080, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas_libs\index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
File "pandas_libs\hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas_libs\hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 0
at com.samsung.sds.brightics.agent.context.python.PythonProcessManager.run(PythonProcessManager.java:283)
at com.samsung.sds.brightics.agent.context.python.PythonProcessManager.run(PythonProcessManager.java:240)
at com.samsung.sds.brightics.agent.context.python.PythonContext.runScript(PythonContext.java:91)
at com.samsung.sds.brightics.agent.service.TaskService.executeScript(TaskService.java:195)
at com.samsung.sds.brightics.agent.service.TaskService.executeTaskToContext(TaskService.java:163)
at com.samsung.sds.brightics.agent.service.TaskService.getTaskResult(TaskService.java:115)
at com.samsung.sds.brightics.agent.service.TaskService$1.run(TaskService.java:83)

@krazyeom krazyeom added the help wanted Extra attention is needed label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants