简体   繁体   中英

ImportError: cannot import name 'EXTRACTOR_FILENAME' from 'talon.signature'

I am having trouble getting an import statement to work. I am attempting to use this package: https://github.com/mailgun/talon

I am running the following command:

from talon.signature import EXTRACTOR_FILENAME, EXTRACTOR_DATA

I get the following error:

ImportError: cannot import name 'EXTRACTOR_FILENAME' from 'talon.signature' (system path to file)

While troubleshooting I don't see EXTRACTOR_FILENAME or EXTRACTOR_DATA defined anywhere. I did a search in directory for all files. Is there some sort of convention in python where EXTRACTOR_FILENAME maps to a specific class?

For your project the import looks like this:

  import talon
  from talon import quotations

Put those statements on the top of your file, and it should work. if you don't have the packages on your system type this in your terminal:

pip install talon

The Github repo also explains this

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM