在cubes库中定义维度时,不能同时指定levels和attributes,会触发"Both levels and attributes specified"错误。解决方法包括移除重复定义、合并为一个定义、查阅文档。正确示例如正确定义模型,如定义产品维度时要么使用层次,要么使用属性。