Release: 2.0.6.106 (canary) 2023-05-03

2.0.6.106-2.0.6.106_canary_2023-05-03

  • Added endpoints for S3 compatible storage from Scaleway, thanks
    @adithajay
  • updates rumps to python3, add icon normal-warning, set rumps as default,
    thanks @gpatel-fr
3 Likes

Thanks for cutting this release.

For the record, running Duplicati with trayicon support is now working conditioned by running
sudo pip3 install pyobjc
support:

  • Ventura: unknown (I don’t have access to this platform)
  • Monterey: working
  • Big sur: working but sudo pip3 install pyobjc has issues, it may fail at first, I upgraded pip itself, and it finally installed
  • Catalina: not working (too old to support easily)
1 Like

Ventura starts as expected with pyobjc installed

2 Likes

I’m running in macOS Monterey (and have homebrew installed). Duplicati runs in the background and the web UI works, but the trayicon doesn’t show up.

I’ve installed pyobjc via pip3 as you mentioned.

When you said trayicon is now working, is there something different/specific you’re doing (e.g., a terminal command) other than just running Duplicati from /Applications?

If I try running

mono Duplicati.GUI.TrayIcon.exe 

I get an endless repeat of the following:

Unexpected message: Traceback (most recent call last):
Unexpected message: File "/Users/[user]/Library/Application Support/Duplicati/updates/2.0.6.106/OSXTrayHost/osx-trayicon-rumps.py", line 3, in <module>
Unexpected message: import rumps
Unexpected message: File "/Users/[user]/Library/Application Support/Duplicati/updates/2.0.6.106/OSXTrayHost/rumps.py", line 24, in <module>
Unexpected message: from Foundation import (NSDate, NSTimer, NSRunLoop, NSDefaultRunLoopMode, NSSearchPathForDirectoriesInDomains,
Unexpected message: ModuleNotFoundError: No module named 'Foundation'

Is there a step/something else I’m missing in getting the TrayIcon to appear?

@earthsound

could it be that python2 is installed on your computer ? can you try in a terminal ‘python’, ‘python3’, and in any interpreter that comes up, try to type ‘import pyobjc’ ? Like this (this is not on a Mac, so details will differ):

python3
Python 3.11.0 | packaged by conda-forge | (main, Oct 25 2022, 06:24:40) [GCC 10.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyobjc

I get the same endless ModuleNotFoundError: No module named 'Foundation' error on Ventura. I do have python3 installed (3.11.3) and did install pyobjc.

I don’t have any version of python2 installed, but several versions of python3 (3.6.8, 3.9.16, 3.10.11, & 3.11.3).

Attempting to import pyobjc gave this result:

Python 3.11.3 (main, Apr  7 2023, 19:29:16) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyobjc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pyobjc'

Since I installed with sudo pip, I ran

sudo pip3 uninstall pyobjc

Then ran it normally

pip3 install pyobjc

Still get the same error when trying to import pyobjc in the interpreter.

Next, I tried

import objc

…inside the python3.11.3 interpreter & that seemed to execute without error, however, the trayicon still doesn’t appear if running Duplicati from /Applications.

If I run

mono Duplicati.GUI.TrayIcon.exe 

I get the same endlessly repeated error above & no TrayIcon.
Would love to troubleshoot this more, but, if I’m misremembering how I installed python3 on this box, I’m rusty on how to tell which python3 may have been installed by homebrew and/or Apple’s Xcode developer tools and how that may impact this, if at all.

@earthsound

yes, my mistake, you can’t import pyobjc.
Since you have a lot of snakes in your setup, the one Duplicati is interested in is

/usr/bin/python3

run it and try to import Foundation (for example)

I don’t have access to a Mac with Ventura, however @katertje reported success.
Did you install pyobjc in the system python (/usr/bin/python3) ? It should happen by itself by running in a terminal sudo pip3 install pyobjc.

I was able to import Foundation after running python3.11 (version & which below):

python3 --version && which python3
Python 3.11.3
/usr/local/bin/python3

…but that didn’t fix the issue.

With your info that Duplicati only cares what’s in usr/bin/python3, I see that version is 3.9.6. Trying to import Foundation there didn’t work, either.

The fix: after I installed pyobjc using the pip3 sitting in /usr/bin

/usr/bin/pip3 install pyobjc

…when I run Duplicati from /Applications I get the TrayIcon!
image
It also launches properly when I run:

mono Duplicati.GUI.TrayIcon.exe

…without error.

I see, the problem is that you are using Homebrew, so there are several pip installed.

I’m also using homebrew. @earthsound’s fix worked for me.

Unfortunately, I’m hitting this on a fresh install on macOS 12.7.3. I have homebrew installed here, as well, but I cannot resolve this like I did on the other macOS machines.

When I try running /usr/bin/pip3 install pyobjc I get ERRORs that indicate I need a full Xcode installation (though I don’t have a full Xcode installed on several other macOS machines):

/usr/bin/pip3 install pyobjc
Collecting pyobjc
  Using cached https://files.pythonhosted.org/packages/9e/38/ef2250f1d7bf3f50ba1c877aba6ee56eff09797a88952a32b1283d485933/pyobjc-10.1-py3-none-any.whl
Collecting pyobjc-framework-DVDPlayback==10.1 (from pyobjc)
  Downloading https://files.pythonhosted.org/packages/9d/4c/5227d0747050b4921b817e7dbc2bbcbbc1f66200dbaf49d4d29f1fc756dd/pyobjc_framework_DVDPlayback-10.1-py2.py3-none-any.whl
Collecting pyobjc-framework-Network==10.1; platform_release >= "18.0" (from pyobjc)
  Downloading https://files.pythonhosted.org/packages/e0/2a/862a89d588070954c585c30d36c588d13197a82ebba7b430082e450775d3/pyobjc-framework-Network-10.1.tar.gz (136kB)
     |████████████████████████████████| 143kB 7.6MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/v3/7fy_lfh10l1d38fsbchvs1hc0000gp/T/tmprm25aubs
       cwd: /private/var/folders/v3/7fy_lfh10l1d38fsbchvs1hc0000gp/T/pip-install-ss_gmtdt/pyobjc-framework-Network
  Complete output (23 lines):
  xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
  Traceback (most recent call last):
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/build_meta.py", line 146, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/build_meta.py", line 127, in _get_build_requires
      self.run_setup()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/build_meta.py", line 142, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 25, in <module>
      Extension(
    File "/private/var/folders/v3/7fy_lfh10l1d38fsbchvs1hc0000gp/T/pip-install-ss_gmtdt/pyobjc-framework-Network/pyobjc_setup.py", line 517, in Extension
      lines = subprocess.check_output(["xcodebuild", "-version"], text=True).splitlines()
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 512, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['xcodebuild', '-version']' returned non-zero exit status 1.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Developer/CommandLineTools/usr/bin/python3 /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/v3/7fy_lfh10l1d38fsbchvs1hc0000gp/T/tmprm25aubs Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 24.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

could it be related to this ? could you try to run

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/

as advised in this thread ?

The logs look like it is trying to build wheels (packages for python) on your system. My guess is that your system architecture is different from your other macs where it works without any trouble, and there are no pre-built packages for it. The easiest way to fix it is probably installing the xcode dependencies it is missing.