pytwain icon indicating copy to clipboard operation
pytwain copied to clipboard

Empty source list

Open MosGeo opened this issue 3 years ago • 4 comments

I am getting empty source list using pytwain while twacker (32 bit) and (64 bit) is showing both camera and the test virtual scanner.

I was wondering if anybody has tested pytwain on relatively new software. I already tried changing the dsm manually too. The 32 bit is not recognized and the 64 bit is recognized but it is empty.

Window 10 64 bit. Python 3.8 Latest Twain data source manager.

MosGeo avatar Dec 17 '21 03:12 MosGeo

me too, have you solved this problem?

StarDustEins avatar Mar 01 '22 05:03 StarDustEins

@StarDustEins unfortunately not 😔

MosGeo avatar Mar 01 '22 06:03 MosGeo

When running python scanner.py, I can get a list of sources with some sources.

Running scanner.exe after pyinstaller, the source list is empty.

The 32-bit TWAINDSM.dll can only be called by 32-bit programs.

xiaobo9 avatar May 03 '22 05:05 xiaobo9

On Windows only 32-bit twain_32.dll practically works with TWAIN drivers, e.g. wiatwain.ds driver only works with 32-bit twain_32.dll. More info here: https://twain.org/forums/topic/availability-of-64-bit-twain-drivers/.

I made a change on Windows to use twain_32.dll by default: https://github.com/denisenkom/pytwain/commit/e8a793194f43bc9cc0e7d96697a0482ae85b0a69

Make sure that you use 32-bit Python version when running on Windows.

denisenkom avatar Aug 29 '23 01:08 denisenkom