We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying this code out below.
import twain sm = twain.SourceManager(0) ss = sm.OpenSource() ss.RequestAcquire(0,0) rv = ss.XferImageNatively() if rv: (handle, count) = rv twain.DIBToBMFile(handle, 'image.bmp')
It works fine until the rv = ss.XferImageNatively() part then I get this error
Traceback (most recent call last): File "C:\Paradigm1\test.py", line 5, in rv = ss.XferImageNatively() File "C:\Paradigm1\twain.py", line 2144, in XferImageNatively return self.xfer_image_natively() File "C:\Paradigm1\twain.py", line 1974, in xfer_image_natively rv, handle = self._get_native_image() File "C:\Paradigm1\twain.py", line 1901, in _get_native_image (TWRC_XFERDONE, TWRC_CANCEL)) File "C:\Paradigm1\twain.py", line 1565, in _call return self._sm._call(self._id, dg, dat, msg, buf, expected_returns) File "C:\Paradigm1\twain.py", line 2320, in _call raise exc excTWCC_SEQERROR
Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Try using higher-level function instead: http://pytwain.readthedocs.io/en/latest/twain.html#twain.Source.acquire_file
It should take care of this error. The error means you called function during wrong state.
Sorry, something went wrong.
No branches or pull requests
I am trying this code out below.
import twain
sm = twain.SourceManager(0)
ss = sm.OpenSource()
ss.RequestAcquire(0,0)
rv = ss.XferImageNatively()
if rv:
(handle, count) = rv
twain.DIBToBMFile(handle, 'image.bmp')
It works fine until the rv = ss.XferImageNatively() part
then I get this error
Traceback (most recent call last):
File "C:\Paradigm1\test.py", line 5, in
rv = ss.XferImageNatively()
File "C:\Paradigm1\twain.py", line 2144, in XferImageNatively
return self.xfer_image_natively()
File "C:\Paradigm1\twain.py", line 1974, in xfer_image_natively
rv, handle = self._get_native_image()
File "C:\Paradigm1\twain.py", line 1901, in _get_native_image
(TWRC_XFERDONE, TWRC_CANCEL))
File "C:\Paradigm1\twain.py", line 1565, in _call
return self._sm._call(self._id, dg, dat, msg, buf, expected_returns)
File "C:\Paradigm1\twain.py", line 2320, in _call
raise exc
excTWCC_SEQERROR
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: