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

[Bug] hubble1.5.0 执行创建顶点语句报错Undefined vertex label: '??' #602

Open
1 task done
gudehuang opened this issue Apr 19, 2024 · 5 comments
Open
1 task done
Labels
bug Something isn't working good first issue Good for newcomers hubble hugegraph-hubble

Comments

@gudehuang
Copy link

Bug Type (问题类型)

exception / error (异常报错)

Before submit

  • I had searched in the issues and found no similar issues.

Environment (环境信息)

  • hugegraph 版本:1.2.0
  • hugegraph-hubble版本: 1.5.0
    image

通过docker部署

Expected & Actual behavior (期望与实际表现)

执行创建顶点语句,报错 Undefined vertex label: '??'

g.addV('地点').property(id, '17700').property('name', '海南')

image

我使用HugeGraph Java Client 执行同样的语句能成功.

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

@gudehuang gudehuang added the bug Something isn't working label Apr 19, 2024
Copy link

dosubot bot commented Apr 19, 2024

The error "Undefined vertex label: '?'" you're encountering in Hubble 1.5.0 when executing the vertex creation statement, but not when using the HugeGraph Java Client, is likely due to a discrepancy in how vertex labels are handled between these interfaces. In Hubble, like in the Java Client, a vertex label must be predefined in the schema before you can add vertices with that label. The Java Client enforces this by requiring the creation of a vertex label schema before adding vertices, which is why you don't see the error there.

To resolve this issue in Hubble 1.5.0, ensure that the vertex label '地点' is defined in the schema before attempting to create a vertex with that label. This step is crucial for Hubble to recognize the label and allow vertex creation without errors.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the hubble hugegraph-hubble label Apr 19, 2024
@gudehuang
Copy link
Author

我使用HugeGraph Java Client,执行以下语句是成功的,元数据已经创建好了.

 GremlinManager gremlin=hugeClient.gremlin();
 gremlin.gremlin("g.addV('地点').property(id, '17700').property('name', '海南')").execute();

@imbajin
Copy link
Member

imbajin commented Apr 19, 2024

我使用HugeGraph Java Client,执行以下语句是成功的,元数据已经创建好了.

 GremlinManager gremlin=hugeClient.gremlin();
 gremlin.gremlin("g.addV('地点').property(id, '17700').property('name', '海南')").execute();

@gudehuang First, please use the apache release toolchain(include hubble) version https://hugegraph.apache.org/docs/download/download/ or u could use docker version (Non-apache versions are no longer maintained)

And u could use rest-api to check the data consistency

@dosu-bot The possible reason is related to the parsing of Chinese characters by the backend of the Hubble, which appears to have garbled characters. You can also prompt users to use the latest version and provide a minimum reproducible example and steps

Copy link

dosubot bot commented Apr 19, 2024

To address the "Undefined vertex label: '?'" error you're encountering in Hubble 1.5.0, it's crucial to ensure that the vertex label '地点' is correctly defined in your graph schema. This error typically occurs if the vertex label hasn't been predefined or there's a mismatch in the label name. Here are the steps to resolve this issue:

  1. Verify Vertex Label Definition: Make sure the vertex label '地点' is properly defined in your schema. You can use HugeGraph's schema management tools or API to define or check the vertex label.

  2. Check Encoding and Locale Settings: Ensure your environment supports UTF-8 encoding and, if necessary, set the locale to support Chinese characters (e.g., zh_CN.UTF-8). This is important for Hubble to correctly parse and recognize Chinese characters.

  3. Ensure Compatibility: Confirm that your Hubble version is compatible with the HugeGraph server. Version mismatches can lead to unexpected errors, including issues with character encoding.

  4. Use Schema Validation Features: If available, utilize HugeGraph's schema validation to identify any inconsistencies or issues in your graph schema that might be causing errors.

For future operations, consider using HugeGraph-Loader for data import tasks, as it supports a wide range of data sources and ensures compatibility with your HugeGraph server. Regularly review your graph schema, check system settings for encoding and locale support, verify compatibility before updates, and monitor logs for potential issues.

For detailed steps on schema definition and validation, refer to the HugeGraph documentation and API guides.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@yyri
Copy link

yyri commented Jun 27, 2024

reproduced with binary releases apache-hugegraph-incubating-1.3.0.tar.gz and apache-hugegraph-toolchain-incubating-1.3.0.tar.gz, and browser on chinese windows.

senario 1:
1.replace the value of name to chinese characters,and run the examples to add default graph.
2.run g.V() in hubble, you can find all vertexes, but the EDGES MISS.
3.but you can find the name was saved correctly in backend database, and also correct in the rest api reponse to hubble frontend.

senario 2:
1.in hubble, right click and add vertex
2.input CHINESE CHARACTER in name and save
3.you will find ?? in the graph view.
1
2
3
4
微信截图_20240627151015

@imbajin imbajin added the good first issue Good for newcomers label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hubble hugegraph-hubble
Projects
None yet
Development

No branches or pull requests

3 participants