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

ERROR: source object is already set #675

Open
zuku81 opened this issue Jul 20, 2020 · 10 comments
Open

ERROR: source object is already set #675

zuku81 opened this issue Jul 20, 2020 · 10 comments

Comments

@zuku81
Copy link

zuku81 commented Jul 20, 2020

General informations

  • system/distribution (with version): Ubuntu 20.04 LTS
  • offlineimap version (offlineimap -V): 7.3.3
  • Python version: 2.7
  • server name or domain:
  • CLI options: offlineimap --dry-run -l /root/.offlineimap.log

Logs, error

root@offlineimap:~# offlineimap --dry-run -l /root/.offlineimap.log
OfflineIMAP 7.3.3
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.101 (bundled), Python v2.7.18rc1, OpenSSL 1.1.1f 31 Mar 2020
ERROR: source object is already set
ERROR: Exceptions occurred during the run!
ERROR: source object is already set

Steps to reproduce the error

I'm just trying to move Offlineimap configuration to the new server, but I have such error as above. I don't know how to troubleshoot this because I do not have anything in log.

@chris001
Copy link
Member

Please post back with output from:
python --version

@zuku81
Copy link
Author

zuku81 commented Jul 20, 2020

root@offlineimap:~# python --version
Python 2.7.18rc1

@chris001
Copy link
Member

  1. Could you try to git bisect this? http://offlineimap.org/doc/git-bisect.html

  2. Also, what's your configuration file? Note: Redact/remove private info such as server addresses and passwords.

@nicolas33
Copy link
Member

--dry-run mode is known to have issues. Do you hit this without this option?

@zuku81
Copy link
Author

zuku81 commented Jul 21, 2020

without --dry-run I have the same error:

root@offlineimap:~# offlineimap -l /root/.offlineimap.log
OfflineIMAP 7.3.3
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.101 (bundled), Python v2.7.18rc1, OpenSSL 1.1.1f 31 Mar 2020
ERROR: source object is already set
ERROR: Exceptions occurred during the run!
ERROR: source object is already set

@zuku81
Copy link
Author

zuku81 commented Jul 21, 2020

----------------.offlineimapprc-------------------------------

# Sample minimal config file.  Copy this to ~/.offlineimaprc and edit to
# suit to get started fast.

[general]
# Path to file with arbitrary Python code to be loaded
pythonfile = ~/.offlineimap.py
accounts = WP

[Account WP]
localrepository = WPlocal
remoterepository = Gmail-wp

[Repository WPlocal]
#readonly = true
#sslcacertfile = /etc/ssl/certs/ca-certificates.crt
cert_fingerprint = 2e4efe27a24ffc61ea0c5ccc9145fb5e4ef8c6af
type = IMAP
remotehost = imap.wp.pl
remoteport = 993
ssl = yes
createfolders = false
remoteuser = ***************
#remotepasseval = get_pass()
remotepasseval = unencrypt_password("~/.offlineimappass")
folderfilter = lambda folder: folder in ['INBOX', 'Xpertis', 'Citibank', 'Mbank', 'Trenowanie', 'Wys&AUI-ane']
nametrans = lambda folder:<----> re.sub  ('INBOX', 'WP',
<------><------>re.sub ('Xpertis', 'WP/Xpertis',
<------><------>re.sub ('Citibank', 'WP/Citibank',
<------><------>re.sub ('Mbank', 'WP/Mbank',
<------><------>re.sub ('Trenowanie', 'WP/Trenowanie',
<------><------>re.sub ('Wys&AUI-ane', 'WP/Wys&AUI-ane', folder))))))


[Repository Gmail-wp]
auth_mechanisms  = PLAIN
type = Gmail
ssl = yes
#createfolders = false
#realdelete = true
# Synchronize only the folders Inbox and Sent:
folderfilter = lambda folder: folder in ['WP', 'WP/Xpertis', 'WP/Citibank', 'WP/Mbank', 'WP/Trenowanie', 'WP/Wys&AUI-ane']
#folderincludes =  ['WP', 'WP/Xpertis', 'WP/Citibank', 'WP/Mbank', 'WP/Trenowanie', 'WP/Wys&AUI-ane']
remotehost = imap.gmail.com
remoteuser = ************************
#remotepasseval = get_pass()
remotepasseval = unencrypt_password("~/.offlineimappassgoogletwoway")
cert_fingerprint = cb7bcaea2c188c39c2c91e5f6f6fbe949df29ad0
#sslcacertfile = /etc/ssl/certs/ca-certificates.crt
nametrans = lambda folder:<----> re.sub ('WP', 'INBOX',
<------><------>re.sub ('WP/Xpertis', 'Xpertis',
<------><------>re.sub ('WP/Citibank', 'Citibank',
<------><------>re.sub ('WP/Mbank', 'Mbank',
<------><------>re.sub ('WP/Trenowanie', 'Trenowanie',
<------><------>re.sub ('WP/Wys&AUI-ane', 'Wys&AUI-ane', folder))))))

---------------------------------------------EOF--------------------------------------------------------------

@zuku81
Copy link
Author

zuku81 commented Jul 21, 2020

root@offlineimap:~# cd offlineimap/
root@offlineimap:~/offlineimap# git bisect start
root@offlineimap:~/offlineimap# git bisect good
root@offlineimap:~/offlineimap# git bisect bad
7531ac4640aff8477b0893c55c99c9fe4a9bbcfc was both good and bad
root@offlineimap:~/offlineimap# git bisect skip
7531ac4640aff8477b0893c55c99c9fe4a9bbcfc was both good and bad
root@offlineimap:~/offlineimap# git bisect reset
Already on 'master'
Your branch is up to date with 'origin/master'.
root@offlineimap:~/offlineimap#

@chris001
Copy link
Member

Please post again your (redacted) config file, and precede it with three backticks alone on a line, and followed by three backticks alone on a line, to preserve formatting, as demonstrated here:
https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks

@nicolas33
Copy link
Member

I've edited the posts as requested.

@zuku81
Copy link
Author

zuku81 commented Jul 23, 2020

OK, I just commented these lines in .offlineimap.py

#from offlineimap import OfflineImap
#oi = OfflineImap()
#oi.run()

and my offlineimap is working now ;)

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