Why Persistent class is not working for ZODB

Bogy

Im new to the ZODB and Python in general. Im following tutorial from this page: http://www.zodb.org/en/latest/articles/ZODB1.html

On that page under "Persistent Classes" section there is a piece of code:

import ZODB
from Persistence import Persistent

For some reason it gives me error: "ModuleNotFoundError: No module named 'Persistence'"

What am i missing ? Creating and connecting to database works just fine.

Martijn Pieters

That article is fairly old now and assumes ZODB version 1.x; look at http://www.zodb.org/en/latest/tutorial.html instead, the module is now called persistence (lowercased):

from persistence import Persistence

For more in-depth information, there is also the Writing persistent objects section of the ZODB programming guide.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Why javax validation not working in DTO class?

Why is my configuration test class not working?

Why is PHP private variables working on extended class?

ZODB python database with Filestorage: why do temporary files stay on the disk?

Why is the "thirsty" method on my class not working?

Why this python class is not working with numba jitclass?

Why onchange function not working with semantic class

Why is instanceof in TypeScript not working for inherited class?

Why animation is not working for all class element?

Why are @complete shortcuts not working inside class definition?

Why the CDI is not working in a singleton class

Why the property of the class implementing the interface not working?

Persistent connection not working at all

Why is Spring @Configuration class inheritance not working as expected?

Why isn't ng-class working?

Why is the checking for Class not Working?

Why Toast.maketoast is not working in the BroadcastReceiver class

Why my python class not working?

Why is mock.patch class decorator not working?

Why extending List class is not working here

Python: Why is my class method not working?

Overloading << operator for my own class why is this not working?

Why is class collision not working in PyGame?

Why is Yii 2 class autoloading not working?

Why is the hover class working on the wrong element?

Why is this :class="{}" not working? vueJs

Why is a observer class not working in model?

why is my focus pseudo class not working?

why is button toggle not working with class?