-
-
Notifications
You must be signed in to change notification settings - Fork 745
Open
Description
Expected Behavior
Since I have updated the Eve version to the latest, I have the following error at start up with events hook declaration:
AttributeError: type object 'Eve' has no attribute '__event_slot_cls__'
from eve import Eve
from pymongo import MongoClient
from flask import current_app as app
from flask import send_from_directory, abort, request
from redis import Redis
import asyncio
import time
import json
from eve.auth import TokenAuth, requires_auth
import os
import re
import datetime
file_dir = os.path.dirname(os.path.realpath(__file__))
static_folder = os.path.join(file_dir, 'static')
ALLOWED_EXTENSIONS = {'jpg', 'jpeg'}
def pre_get_callback(resource, request, lookup):
print('A GET request on the "%s" endpoint has just been received!' % resource)
app = Eve(redis=Redis(), auth=AppAuth, static_folder=static_folder)
app.on_pre_GET += pre_get_callback
if __name__ == '__main__':
app.run()
Actual Behavior
There is the full error
File "/home/webapp/bolid/bolid/eve/run.py", line 96, in <module>
app.on_pre_GET += pre_get_callback
File "/home/webapp/bolid/bolidenv/lib/python3.7/site-packages/events/events.py", line 99, in __getattr__
self.__dict__[name] = ev = self.__event_slot_cls__(name)
File "/home/webapp/bolid/bolidenv/lib/python3.7/site-packages/events/events.py", line 89, in __getattr__
(self.__class__.__name__, name))
AttributeError: type object 'Eve' has no attribute '__event_slot_cls__'
Environment
- Python version: python3.7
- Eve version:
- Eve version: 1.1.5
- Events: 0.4
Metadata
Metadata
Assignees
Labels
No labels