Skip to content
New issue

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

Unrecognized data type for Blob #9

Open
barryanderson opened this issue Oct 18, 2016 · 6 comments
Open

Unrecognized data type for Blob #9

barryanderson opened this issue Oct 18, 2016 · 6 comments

Comments

@barryanderson
Copy link

I'm getting an exception when reading some tables that contain BLOB/Notes fields.

The following exception is thrown:
<class 'pypxlib.PXError'>, PXError('Unrecognized data type: 14',), <traceback object at 0x7ffa32b18128>

Should the library correctly deal with these blobs?

@mherrmann
Copy link
Owner

Hi,

support for this field is currently not implemented (because I don't need
it). If you implement it, I'd be happy to accept a pull request.

Cheers

Am 18.10.2016 12:11 nachm. schrieb "Barry Anderson" <
[email protected]>:

I'm getting an exception when reading some tables that contain BLOB/Notes
fields.

The following exception is thrown:
, PXError('Unrecognized data type: 14',),

Should the library correctly deal with these blobs?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#9, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABBsqcMIJ6tpaFyMRZEOgndv3Km8jCL9ks5q1JtJgaJpZM4KZm6E
.

@votes votes bot added the 1 vote label May 15, 2017
@mherrmann mherrmann removed the 1 vote label May 15, 2017
@alandmoore
Copy link
Contributor

Do you have any general advice on how one might implement this? I tried just adding pxfFmtMemoBLOb to the tuple on line 124 of __init__.py, since I couldn't see anywhere else where types were explicitly being handled. I can open a table with those fields now, but trying to access the fields only gives me a single-char bytestring (b'\x07' or b\x01).

If you have any advice, I'd love to get this implemented.

@mherrmann
Copy link
Owner

I briefly looked at this now. I can't give much advice I'm afraid, because I myself don't know how to do it off the top of my head. You'll likely find answers in the documentation of pxlib. Sorry I can't be of more help. If you come up with an implementation, it would be great if you could share it with others by submitting a Pull Request.

@alandmoore
Copy link
Contributor

Naturally, I will make a pull request should I make any progress.

That doesn't seem likely, though. The pxlib documentation doesn't seem to make any distinction between the handling of FormatBlob fields and regular Blob fields, the latter of which is already handled by pypxlib. So in theory, sending a FormatBlob through the same read logic should work.

I'm not convinced that pxlib actually handles these fields correctly, though. The pxview utility spits out a lot of binary garbage reading these fields (though more than one byte). Though maybe that binary garbage is what's in the field.

@alandmoore
Copy link
Contributor

Well, I'm stumped. I've grepped through the pxlib and pxview code, and I see no distinction there between how any of the Blob types are handled. There is no special conditional code for FmtMemoBlob fields.

I've stepped through pypxlib reading such fields like it does a regular blob, poking around at variables along the way, but I can't make much sense of it. @mherrmann Did you ever try implementing this field and run into some kind of problem, or did you never attempt it since you didn't need it? Just grasping for any straws at this point.

@mherrmann
Copy link
Owner

I've never had to implement it and don't know how one would go about it. I'm sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants