Git Product home page Git Product logo

cookbot's People

Contributors

pjwerneck avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

cookbot's Issues

Consuming tesseract (API?) in Windows 10

I'm attempting to port this bot to Windows 10! In cookbot/ocr.py I have changed:

#libname = '/usr/lib/libtesseract.so.3'
#TESSDATA_PREFIX = '/usr/share/tesseract-ocr'
libname = 'C:/Program Files (x86)/Tesseract-OCR/libtesseract-3.dll'
TESSDATA_PREFIX = 'C:/Program Files (x86)/Tesseract-OCR/tessdata'

print libname
libtesseract = ctypes.cdll.LoadLibrary(libname)

However, I observe a WindowsError (even running standalone) and can't seem to find a way to make ocr.py do whatever it's designed to do (were it running on Linux). Do you have general advice about how to use tesseract (or why cookbot consumes its API instead of running its executable)? Thanks in advance.

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> libname = 'C:/Program Files (x86)/Tesseract-OCR/libtesseract-3.dll'
>>> print libname
C:/Program Files (x86)/Tesseract-OCR/libtesseract-3.dll
>>> libtesseract = ctypes.cdll.LoadLibrary(libname)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\ctypes\__init__.py", line 440, in LoadLibrary
    return self._dlltype(name)
  File "C:\Python27\lib\ctypes\__init__.py", line 362, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 is not a valid Win32 application

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.