1. 程式人生 > 其它 >ValueError: The following settings are not supported: {'username': 'neo4j'}

ValueError: The following settings are not supported: {'username': 'neo4j'}

環境:

neo4j 4.4.5

python 3.8

py2neo 2021.2.3

報錯詳情

 

原因分析:

在高版本不支援username引數。檢視Graph初始化引數

檔案位置:

 接受一個配置檔案預設為空,name預設為空(name可以不填寫,因為py2neo的初始化檔案中定義了預設值詳見圖一)和一個可變引數settings

下面是呼叫的過程

 

 

 

 

 

 

 

 

 

 解決方案:

如下:

 

 三種方式都可以,還可以使用配置檔案方式

 

 

 

TRANSLATE with x English
Arabic Hebrew Polish
Bulgarian
Hindi Portuguese
Catalan Hmong Daw Romanian
Chinese Simplified Hungarian Russian
Chinese Traditional Indonesian Slovak
Czech Italian Slovenian
Danish Japanese Spanish
Dutch Klingon Swedish
English Korean Thai
Estonian Latvian Turkish
Finnish Lithuanian Ukrainian
French Malay Urdu
German Maltese Vietnamese
Greek Norwegian Welsh
Haitian Creole Persian  
  TRANSLATE with COPY THE URL BELOW Back EMBED THE SNIPPET BELOW IN YOUR SITE Enable collaborative features and customize widget: Bing Webmaster Portal Back