Comments (6)
@gotcha can you compare this with your issue?
from collective.exportimport.
Checking the code I suspected that get_dx_blob_path
could have had the same issue, so I wanted to provide a PR for both.
But amazingly this does not happen with dx images:
(Pdb++) from collective.exportimport.serializer import get_dx_blob_path
(Pdb++) image
<plone.namedfile.file.NamedBlobImage object at 0x7fd9d829bed0 oid 0xca26d in <Connection at 7fd9ed5034f0>>
(Pdb++) with image._blob.open() as f: f.name.partition("blobstorage/")[-1] == get_dx_blob_path(image)
True
For whatever reason this works because the _p_serial
is the same for the field instance and the blob:
(Pdb++) image._p_serial == image._blob._p_serial
True
from collective.exportimport.
Note, relying on blob._p_serial
might not be good at all because when the blob is not loaded it has a value of '\x00\x00\x00\x00\x00\x00\x00\x00'
:
(Pdb) db._storage.fshelper.layout.getBlobFilePath(blob._p_oid, blob._p_serial)
'0x00/0x00/0x00/0x00/0x00/0x1f/0x16/0x07/0x00.blob'
(Pdb) blob.open()
<open file '/srv/recensio/deployment/work/zeo/parts/db-main/blobs/0x00/0x00/0x00/0x00/0x00/0x1f/0x16/0x07/0x038ed85d46749933.blob', mode 'rb' at 0x7f5b808627d0>
(Pdb) db._storage.fshelper.layout.getBlobFilePath(blob._p_oid, blob._p_serial)
'0x00/0x00/0x00/0x00/0x00/0x1f/0x16/0x07/0x038ed85d46749933.blob'
from collective.exportimport.
This is because the connection.set_state is not yet called:
(Pdb) tid
'\x00\x00\x00\x00\x00\x00\x00\x00'
(Pdb) debug blob.open()
ENTERING RECURSIVE DEBUGGER
> <string>(1)<module>()
((Pdb)) s
--Call--
> /srv/recensio/deployment/work/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py(848)setstate()
-> def setstate(self, obj):
from collective.exportimport.
@pbauer It is the same issue...
from collective.exportimport.
@ale-rt We had a similar issue where we made fixes to some objects that implied a different tid/serial between the blob wrapper and the blob...
That might explain why you do not see problems with dx objects. But AFAICS, there is also a wrapper and a blob so it seems they could have different tid/serial.
from collective.exportimport.
Related Issues (20)
- Drop Python 3.6 support? HOT 1
- Discussion importer should not check for discussion support being enabled on a particular content object HOT 4
- why is the UID set after the custom_contenttype hook? HOT 2
- Can't export content with versions in Plone 5.0 HOT 1
- Robustness in content_export for CMFEditions versions, lock_info
- fix_html_in_portlets should also support additional fixers
- Timezone dropped from non-naive datetimes during conversion
- Better Reporting of Failed Exported Objects
- relative path not used when exporting p.a.redirector rules HOT 1
- Usage of json.dumps before deserialization @import HOT 2
- Editing revision author is not preserved on import HOT 1
- ```Import of plone.app.contenttypes.migration.topics import CONVERTERS not working with V 1.9 HOT 1
- Import of plone.app.contenttypes.migration.topics import CONVERTERS not working with V 1.9 HOT 2
- KeyError: 'time' for history_item HOT 1
- Migration between Volto sites HOT 4
- LDAP principals not added to existing groups
- Error during export from Plone 4.3 HOT 2
- KeyError: '@id' while importing redirects/ordering with collective.exportimport 1.10 HOT 1
- Readme does not render due a issue in github HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collective.exportimport.