【问题标题】:Lexical Error while running featuretoolsR运行 featuretoolsR 时出现词法错误
【发布时间】:2019-08-29 09:53:33
【问题描述】:

为了测试 featuretools 的工作,我通过 RStudio 安装了 featuretoolsR,并在 Python 中安装了 numpy 和 featuretools。

但是在尝试创建实体时,会出现以下错误

# Libs
library(featuretoolsR)
library(magrittr)

# Create some mock data
set_1 <- data.frame(key = 1:100, value = sample(letters, 100, T))
set_2 <- data.frame(key = 1:100, value = sample(LETTERS, 100, T))

# Create entityset
es <- as_entityset(set_1, index = "key", entity_id = "set_1", id = "demo")```

Error: lexical error: invalid char in json text.
                                       WARNING: The conda.compat modul
                     (right here) ------^

Kindly help in diagnosing and providing solution to same.

【问题讨论】:

  • 这似乎是错误。尝试通过github联系作者

标签: r featuretools


【解决方案1】:

更新到 conda 版本 4.6.11 后,同样的警告发生在我身上。我认为问题是由于 compat.py 脚本末尾的 print 语句产生的。我知道这不是一个很好的解决方法,但我访问了 compat.py 文件并删除了打印语句:

print("WARNING: The conda.compat module is deprecated and will be removed in a future release.", file=sys.stderr) 

文件应该位于:\Anaconda3\pkgs\conda-4.6.11-py37_0\Lib\site-packages\conda

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-21
    • 2013-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多