Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    • Menu
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • Mayan EDMS Mayan EDMS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 10
    • Merge requests 10
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mayan EDMS
  • Mayan EDMSMayan EDMS
  • Issues
  • #894
Closed
Open
Created Oct 10, 2020 by Michael Price@price_michaelReporter

Errors with watch folders in version 3.5

From the forum: https://forum.mayan-edms.com/viewtopic.php?t=4027

Hi,

I upgraded Mayan with Docker to 3.5. Now I am not able to delete the watchfolders I created and just getting an error. Additionally the docker protocol/log gets spammed with errors. When I disable the watchfolders the errors are gone, but other errors appear (see 2nd code). Despite the errors, if enabled the watchfolders still work.

I use PostgreSQL 12.3 container und Redis 5.0 alpine container. I did not touch them after updating the Mayan container. Can anyone help me?

P.S.: Mayan is great, thx!

[2020-10-10 07:59:40,120: ERROR/ForkPoolWorker-2] Error processing source id: 4; get() returned more than one ErrorLog -- it returned 2!,
[2020-10-10 07:59:40,123: ERROR/ForkPoolWorker-2] Task mayan.apps.sources.tasks.task_check_interval_source[5f76e187-9c23-4847-ac9d-941c0dcd5115] raised unexpected: AttributeError("'WatchFolderSource' object has no attribute 'logs'"),
Traceback (most recent call last):,
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/tasks.py", line 43, in task_check_interval_source,
    source.check_source(test=test),
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/models/base.py", line 224, in check_source,
    self.error_log.all().delete(),
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/logging/classes.py", line 42, in method_instance_logs,
    error_log_partition, created = error_log_instance.model.partitions.get_or_create(,
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/logging/classes.py", line 34, in model,
    model, created = ErrorLogModel.objects.get_or_create(name=self.app_config.name),
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method,
    return getattr(self.get_queryset(), name)(*args, **kwargs),
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/query.py", line 538, in get_or_create,
    return self.get(**kwargs), False,
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/query.py", line 412, in get,
    (self.model._meta.object_name, num),
mayan.apps.logging.models.ErrorLog.MultipleObjectsReturned: get() returned more than one ErrorLog -- it returned 2!,
,
During handling of the above exception, another exception occurred:,
,
Traceback (most recent call last):,
  File "/opt/mayan-edms/lib/python3.7/site-packages/celery/app/trace.py", line 412, in trace_task,
    R = retval = fun(*args, **kwargs),
  File "/opt/mayan-edms/lib/python3.7/site-packages/celery/app/trace.py", line 704, in __protected_call__,
    return self.run(*args, **kwargs),
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/sources/tasks.py", line 48, in task_check_interval_source,
    source.logs.create(,
AttributeError: 'WatchFolderSource' object has no attribute 'logs',
mayan.apps.sources.tasks <405> [ERROR] "task_check_interval_source() line 46 Error processing source id: 4; get() returned more than one ErrorLog -- it returned 2!",
edms/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/views/mixins.py", line 128, in dispatch
    return super(ExternalObjectMixin, self).dispatch(*args, **kwargs)
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/views/mixins.py", line 554, in dispatch
    ).dispatch(request, *args, **kwargs)
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/views/generic/list.py", line 142, in get
    self.object_list = self.get_queryset()
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/views/generics.py", line 809, in get_queryset
    queryset = super(SingleObjectListView, self).get_queryset()
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/views/mixins.py", line 508, in get_queryset
    queryset = self.get_source_queryset()
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/logging/views.py", line 47, in get_source_queryset
    return self.external_object.error_log.all()
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/logging/classes.py", line 42, in method_instance_logs
    error_log_partition, created = error_log_instance.model.partitions.get_or_create(
  File "/opt/mayan-edms/lib/python3.7/site-packages/mayan/apps/logging/classes.py", line 34, in model
    model, created = ErrorLogModel.objects.get_or_create(name=self.app_config.name)
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/query.py", line 538, in get_or_create
    return self.get(**kwargs), False
  File "/opt/mayan-edms/lib/python3.7/site-packages/django/db/models/query.py", line 412, in get
    (self.model._meta.object_name, num)
mayan.apps.logging.models.ErrorLog.MultipleObjectsReturned: get() returned more than one ErrorLog -- it returned 2!
Assignee
Assign to
Time tracking