开发者社区 > 大数据与机器学习 > 大数据计算 MaxCompute > 正文

大数据计算MaxCompute报这个错是为啥啊?

大数据计算MaxCompute报这个错是为啥啊?Executing user script with PyODPS 0.11.5
/opt/taobao/tbdpapp/pyodps/pyodpswrapper.py:988: UserWarning: Global variable doc you are about to set conflicts with pyodpswrapper or builtin variables. It might not be runnable with multiprocessing.
"It might not be runnable with multiprocessing." % key
/opt/taobao/tbdpapp/pyodps/pyodpswrapper.py:988: UserWarning: Global variable options you are about to set conflicts with pyodpswrapper or builtin variables. It might not be runnable with multiprocessing.
"It might not be runnable with multiprocessing." % key
Tunnel session created:

你似乎替换了部分节点提供的对象或者 Python 内置对象,替换的对象为
options
替换这些对象可能会导致难以预期的结果。如果你没有获得符合预期的执行结果,请检查是否这些更改导致了错误。
注意,如果你需要使用自己定义的账号而非系统提供的账号,可以使用 o.as_account 而不是自己重新创建一个
ODPS 实例。

Code with error

'''PyODPS 3
请确保不要使用从 MaxCompute下载数据来处理。下载数据操作常包括Table/Instance的open_reader以及 DataFrame的to_pandas方法。
推荐使用 PyODPS DataFrame(从 MaxCompute 表创建)和MaxCompute SQL来处理数据。
更详细的内容可以参考:https://help.aliyun.com/document_detail/90481.html
'''
import maxframe.dataframe as md
from maxframe import new_session
from maxframe.config import options
options.sql.enable_mcqa = False
table = o.create_table("test_source_table", "a string, b bigint", if_not_exists=True)
with table.open_writer() as writer:
writer.write([
["value1", 0],
["value2", 1],
])

创建MaxFrame session

session = new_session(o)
df = md.read_odps_table("test_source_table",indexcol="b")
df["a"] = "prefix
" + df["a"]

打印dataframe数据

print(df.execute().fetch())

MaxFrame DataFrame数据写入MaxCompute表

md.to_odps_table(df, "test_prefix_source_table").execute()

销毁 maxframe session

session.destroy()

===================
Traceback (most recent call last):
File "", line 19, in
session = new_session(o)
File "/home/tops/lib/python3.7/site-packages/maxframe/session.py", line 1229, in new_session
kwargs,
File "/home/tops/lib/python3.7/site-packages/maxframe/session.py", line 813, in init
isolated_session = fut.result()
File "/home/tops/lib/python3.7/concurrent/futures/_base.py", line 432, in result
return self.get_result()
File "/home/tops/lib/python3.7/concurrent/futures/_base.py", line 384, in
get_result
raise self._exception
File "/home/tops/lib/python3.7/site-packages/maxframe_client/session/odps.py", line 105, in init
await session_obj._init(address)
File "/home/tops/lib/python3.7/site-packages/maxframe_client/session/odps.py", line 130, in _init
session_info = await self.ensure_async_call(self._caller.create_session)
File "/home/tops/lib/python3.7/site-packages/maxframe/utils.py", line 475, in to_thread
return await asyncio.wait_for(asyncio.shield(task), timeout)
File "/home/tops/lib/python3.7/asyncio/tasks.py", line 388, in wait_for
return await fut
File "/home/tops/lib/python3.7/site-packages/maxframe/utils.py", line 436, in to_thread_pool
return await loop.run_in_executor(pool, func_call)
File "/home/tops/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args,
self.kwargs)
File "/home/tops/lib/python3.7/site-packages/maxframe_client/session/task.py", line 154, in create_session
running_cluster=self._running_cluster,
File "/home/tops/lib/python3.7/site-packages/odps/models/instances.py", line 155, in create
resp = self._client.post(url, xml, headers=headers)
File "/home/tops/lib/python3.7/site-packages/odps/rest.py", line 259, in post
return self.request(url, 'post', data=data, **kwargs)
File "/home/tops/lib/python3.7/site-packages/odps/rest.py", line 177, in request
pass
File "/home/tops/lib/python3.7/contextlib.py", line 119, in exit
next(self.gen)
File "/home/tops/lib/python3.7/site-packages/odps/rest.py", line 251, in _request
errors.throw_if_parsable(res, self._endpoint, self._tag)
File "/home/tops/lib/python3.7/site-packages/odps/errors.py", line 97, in throw_if_parsable
raise parse_response(resp, endpoint, tag)
odps.errors.NoPermission: NoPermission: RequestId: 661E46A0619FCFC29E6D90BD Tag: ODPS Endpoint:

ODPS-0420095: Access Denied - The task is not in release range: MaxFrame

展开
收起
三分钟热度的鱼 2024-04-25 08:25:33 246 0
1 条回答
写回答
取消 提交回答
  • o.project = "project_name"
    o.to_global() 这样切一下project 。去独享调度资源组的运维中心 手动创建一个命令
    /home/tops/bin/pip3 install maxframe==0.1.0b3 -i https://pypi.tuna.tsinghua.edu.cn/simple
    此回答整理自钉群“MaxFrame官方用户支持群”

    2024-04-25 08:58:58
    赞同 3 展开评论 打赏

MaxCompute(原ODPS)是一项面向分析的大数据计算服务,它以Serverless架构提供快速、全托管的在线数据仓库服务,消除传统数据平台在资源扩展性和弹性方面的限制,最小化用户运维投入,使您经济并高效的分析处理海量数据。

相关产品

  • 云原生大数据计算服务 MaxCompute
  • 相关电子书

    更多
    Data+AI时代大数据平台应该如何建设 立即下载
    大数据AI一体化的解读 立即下载
    极氪大数据 Serverless 应用实践 立即下载