{"id":27968,"library":"mozprofile","title":"mozprofile","description":"Library to create and modify Mozilla application profiles. Version 3.0.0 is the latest. Release cadence is irregular, often tied to Mozilla development cycles.","status":"active","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/mozilla/mozprofile","tags":["mozilla","profile","firefox","testing"],"install":[{"cmd":"pip install mozprofile","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"File operations for profile cleanup","package":"mozfile","optional":false},{"reason":"Logging infrastructure","package":"mozlog","optional":false}],"imports":[{"note":"Profile is exposed at top-level, not in submodule","wrong":"from mozprofile.profile import Profile","symbol":"Profile","correct":"from mozprofile import Profile"},{"note":null,"wrong":null,"symbol":"FirefoxProfile","correct":"from mozprofile import FirefoxProfile"}],"quickstart":{"code":"from mozprofile import FirefoxProfile\nprofile = FirefoxProfile()\nprofile.set_preference('browser.startup.homepage', 'https://example.com')\nprint(profile.profile)","lang":"python","description":"Creates a Firefox profile with a custom homepage preference."},"warnings":[{"fix":"Replace Profile() with FirefoxProfile() or appropriate subclass.","message":"In version 3.0.0, the 'Profile' class is no longer directly instantiable; use 'FirefoxProfile' or 'ThunderbirdProfile' instead.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use profile.create_new_profile(clone_from=...) instead.","message":"The 'clone_profile' method is deprecated; use 'create_new_profile' with cloning parameters.","severity":"deprecated","affected_versions":">=2.5.0"},{"fix":"Call profile.cleanup() explicitly if you need to control deletion.","message":"Profile paths are temporary by default; they are deleted when the Profile object is garbage collected or the script ends.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run 'pip install mozprofile' in the correct environment (e.g., virtualenv).","cause":"The library was installed in a different Python environment or not installed at all.","error":"ModuleNotFoundError: No module named 'mozprofile'"},{"fix":"Upgrade to latest mozprofile and use FirefoxProfile.set_preference().","cause":"Using an older API where set_preference was not a direct method.","error":"AttributeError: 'Profile' object has no attribute 'set_preference'"},{"fix":"Ensure no other process is cleaning up the same profile path; call profile.cleanup() only once.","cause":"The temporary profile directory was deleted prematurely, possibly by a concurrent cleanup.","error":"OSError: [Errno 2] No such file or directory: '/tmp/...'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}