joeferraro / MavensMate-SublimeText

Sublime Text plugin for Salesforce developers. Aims to replace the Eclipse-based Force.com IDE.
http://mavensmate.com
GNU General Public License v3.0
290 stars 119 forks source link

[OPERATION FAILED]: Could not load default MavensMate settings. #406

Closed tgentet-obrien closed 10 years ago

tgentet-obrien commented 10 years ago

I am trying to convert a project that I created in Eclipse into one in MavensMate but I am getting this error: [OPERATION FAILED]: Could not load default MavensMate settings.

I got this in the Sublime Text Console:

MAVENSMATE]: Calling mm_interface [MAVENSMATE]: OPERATION: new_project_from_existing_directory [MAVENSMATE]: {'params': {'directory': '/Users/tgentet-obrien/Dune'}} [MAVENSMATE]: executing mm terminal call: [MAVENSMATE]: /Applications/MavensMate.app/Contents/Resources/mm/mm --ui -o new_project_from_existing_directory -c SUBLIME_TEXT_3 [MAVENSMATE]: {"directory": "/Users/tgentet-obrien/Dune"} [MAVENSMATE]: response from mm: {"body": "Could not load default MavensMate settings.", "stack_trace": "Traceback (most recent call last):\n File \"/Users/josephferraro/Development/Github/mm/tools/pyinstaller-dev/mm/build/pyi.darwin/mm/out00-PYZ.pyz/lib.request\", line 63, in execute\n File \"/Users/josephferraro/Development/Github/mm/tools/pyinstaller-dev/mm/build/pyi.darwin/mm/out00-PYZ.pyz/lib.request\", line 54, in setup_connection\n File \"/Users/josephferraro/Development/Github/mm/tools/pyinstaller-dev/mm/build/pyi.darwin/mm/out00-PYZ.pyz/lib.connection\", line 34, in __init\n File \"/Users/josephferraro/Development/Github/mm/tools/pyinstaller-dev/mm/build/pyi.darwin/mm/out00-PYZ.pyz/lib.connection\", line 169, in get_plugin_client_settings\nMMException: Could not load default MavensMate settings.\n", "success": false}

Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 440, in isenabled ret = self.is_enabled() File "/Users/tgentet-obrien/Library/Application Support/Sublime Text 3/Packages/MavensMate/mavensmate.py", line 1945, in is_enabled fn, ext = os.path.splitext(active_view.file_name()) File "X/posixpath.py", line 125, in splitext File "X/genericpath.py", line 92, in _splitext AttributeError: 'NoneType' object has no attribute 'rfind' Traceback (most recent call last): File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 440, in isenabled ret = self.is_enabled() File "/Users/tgentet-obrien/Library/Application Support/Sublime Text 3/Packages/MavensMate/mavensmate.py", line 1945, in is_enabled fn, ext = os.path.splitext(active_view.file_name()) File "X/posixpath.py", line 125, in splitext File "X/genericpath.py", line 92, in _splitext AttributeError: 'NoneType' object has no attribute 'rfind'

joeferraro commented 10 years ago

Paste your default settings for MavensMate

tgentet-obrien commented 10 years ago

@joeferraro Thanks!!!! and sorry in advance if it is a stupid question ;)

/* 

MavensMate settings
NOTE: MavensMate user settings will override MavensMate default settings
To override default MavensMate settings, modify user-specific settings (MavensMate --> Settings --> User) 
** Most changes require a SublimeText restart **
*/

{
    //set to absolute location where you wish your MavensMate project to reside
    //if the location does not exist, MavensMate will attempt to create it
    //for example: "/Users/username/Documents/workspaces/mavensmate" (notice the absolute path)
    //WINDOWS USERS: it's probably best to set this like so: C:\\path\\to\\your\\workspace
    //****NEW****: you can now set mm_workspace to an array of locations on your file system
    //EXAMPLE:
    // "mm_workspace" : [
    //      "/my/workspace",
    //      "/my/other/workspace",
    //      "/my/super/secret/workspace"
    // ]
    "mm_workspace" : [
                    "/Users/tgentet-obrien/SFDC",
                    "/Users/tgentet-obrien/Dune",
                    "/Users/tgentet-obrien/GB",
                    "/Users/tgentet-obrien/",
    ],

    //set if you're behind a proxy (you can also set via export HTTP_PROXY, export HTTPS_PROXY)
    //----IMPORTANT: you MUST escape the 2 slashes after http: and https: as shown below (dont ask, it's a dumb JSON-with-comments parsing issue)
    //examples: 
    //  "mm_http_proxy"  : "http:\/\/10.10.1.10:3128",
    //  "mm_https_proxy" : "http:\/\/10.10.1.10:1080"
    //
    // HTTP Basic Auth
    //  "mm_http_proxy"  : "http:\/\/user:pass@10.10.1.10:3128/",
    //  "mm_https_proxy" : "http:\/\/user:pass@10.10.1.10:1080/"

    "mm_http_proxy" : "",

    "mm_https_proxy" : "",

    //set to desired Salesforce.com API version (tooling api functionality requires 27.0+)
    "mm_api_version" : "28.0",

    //if true, MavensMate will automatically hide the debug panel upon a successful operation
    "mm_hide_panel_on_success" : true,

    //the amount of time (in seconds) before MavensMate hides the debug panel upon a successful operation
    "mm_hide_panel_time" : 0,

    //if true, MavensMate will capture the save file operation and compile to the Salesforce.com server automatically 
    "mm_compile_on_save" : true,

    //if true, MavensMate will check for server conflicts and present a server diff when it finds a conflict
    "mm_compile_check_conflicts": true,

    //if true, MavensMate will present local/server diff view when conflict is found for the purposes of merging changes (beta)
    "mm_diff_server_conflicts": true,

    //if true, MavensMate will scroll to the line of a reported exception when there is a compilation error
    "mm_compile_scroll_to_error": true,

    //if true, MavensMate will rollback compiles when an error is encountered
    "mm_compile_rollback_on_error": true,

    //if true, MavensMate will hook into the Sublime Text completions API to offer code assistance
    "mm_autocomplete" : true,

    //if true, MavensMate will check for updates when Sublime Text starts
    "mm_check_for_updates" : true,

    //possible values: CRITICAL, ERROR, WARNING, DEBUG, INFO
    "mm_log_level" : "INFO",

    //location where mm debug log should be placed (must be existing path)
    //windows users: please set like so: C:\\path\\to\\your\\logs
    "mm_log_location" : "",

    //if true, mavensmate will send usage statistics (NEVER sensitive information like usernames/passwords/etc) for development, reporting, & debugging purposes (see util.py for source of the call)
    "mm_send_usage_statistics" : true,

    //OSX only: the location of MavensMate.app
    "mm_app_location" : "/Applications/MavensMate.app",

    //OSX only: the location of the mm command line tool (must be inside MavensMate.app)
    "mm_location" : "/Applications/MavensMate.app/Contents/Resources/mm/mm",

    //linux/windows users: ignore this setting
    "mm_use_browser_as_ui" : false, 

    //(advanced users only) set to location of your python 2.7 install (mm_debug_mode must be set to true)
    "mm_python_location" : "/usr/bin/python",

    //(advanced users only) set to true if you want to use system python (mm_python_location must be set)
    "mm_debug_mode" : false,

    //linux users: the location of your "subl" executable
    "mm_subl_location" : "/usr/local/bin/subl",

    //windows users: set to the location of your sublime_text.exe
    "mm_windows_subl_location" : "C:/Program Files/Sublime Text 3/sublime_text.exe",

    //specify a path for custom wsdl files here. wsdls must be named: apex.xml, partner.xml, metadata.xml, tooling.xml
    "mm_wsdl_path" : "",

    //OSX only: the location of your Sublime Text install
    "mm_plugin_client_location" : "/Applications",

    //OSX only: the name of your plugin client app (Sublime Text.app, Sublime Text 3.app, etc.)
    "mm_osx_plugin_client_app_name" : "Sublime Text 3.app",

    //set to true to use the tooling api to compile apex metadata (if you're experiencing any compile issues, set this to false to use the metadata api)
    "mm_compile_with_tooling_api" : true,

    //set to true if you want a history of your executed apex scripts in project/apex-scripts
    "mm_log_anonymous_apex" : true,

    //set to true to play notification sounds
    "mm_play_sounds" : true,

    //local server port
    "mm_server_port" : 7777,

    //mavensmate will attempt to compile when savings files with the following extensions
    "mm_apex_file_extensions": [
        ".page",
        ".component",
        ".cls",
        ".object",
        ".trigger",
        ".layout",
        ".resource",
        ".remoteSite",
        ".labels", 
        ".app",
        ".dashboard",
        ".permissionset",
        ".workflow",
        ".email",
        ".profile",
        ".scf",
        ".queue",
        ".reportType",
        ".report",
        ".weblink",
        ".tab",
        ".letter",
        ".role",
        ".homePageComponent",
        ".homePageLayout",
        ".objectTranslation",
        ".flow",
        ".datacategorygroup",
        ".snapshot",
        ".site",
        ".sharingRules",
        ".settings",
        ".callCenter",
        ".community",
        ".authProvider",
        ".customApplicationComponent",
        ".quickAction",
        ".approvalProcess",
        ".html"
    ],

    //template location, e.g. "remote" or "local" ("remote" refers to templates located on github)
    "mm_template_location": "remote",

    //template location 
    //if "mm_template_location" is set to "local", set to absolute location of the directory where you've forked the MavensMate-Templates project
        //example: "mm_template_source" : "/path/to/templates"
    //if "mm_template_location" is set to "remote", set to github location)
        //example: "mm_template_source" : "username/reponame/branchname"
    //project directory/repository must be in the format found here: https://github.com/joeferraro/MavensMate-Templates
    "mm_template_source": "joeferraro/MavensMate-Templates/master",

    //if true, MavensMate.app will start when Sublime Text starts
    "mm_start_app_on_st_startup" : true,

    //the default metadata available in a project (may be set on a per-project basis in the "advanced" tab of the new and edit project UIs)
    "mm_default_subscription" : [
        "ApexClass",
        "ApexComponent",
        "ApexPage",
        "ApexTrigger",
        "StaticResource",
        "CustomObject",
        "Profile"
    ],

    //ignore metadata from managed packages (highly recommended)
    "mm_ignore_managed_metadata" : true,

    //the number of the most recent apex debug logs to download during the "fetch logs" command
    "mm_number_of_logs_limit" : 10,

    //choices: "metadata" or "apex". "metadata" is recommended, however if your tests are taking forever to run, try switching to "apex"
    //we're working on async testing api support in 0.36
    "mm_test_api" : "metadata",

    //if true, mavensmate will store all deployment packages in your project's "deploy" directory
    "mm_archive_deployments" : true,

    //if true, mavensmate will set the purgeOnDelete to true during metadata deletes (a hard delete)
    "mm_purge_on_delete" : false,

    "mm_verbose" : false,

    //set to false if during completions, the size of your .org_metadata file is bogging down the editor during code completion
    "mm_use_org_metadata_for_completions" : true,

    //set to false if index symbol indexing during project creation/upgrade is causing timeouts
    "mm_mass_index_apex_symbols" : false,

    //set to false if you want to use the async apex testing endpoint (beta)
    "mm_use_legacy_test_ui" : true,

    //if true, a log will be generated for every test run during "run all tests" command
    "mm_download_logs_during_run_all_tests" : false,

    //timeout (in seconds) for calls to the Salesforce.com servers
    "mm_timeout" : 10
}
joeferraro commented 10 years ago

you have invalid JSON:

 "mm_workspace" : [
                    "/Users/tgentet-obrien/SFDC",
                    "/Users/tgentet-obrien/Dune",
                    "/Users/tgentet-obrien/GB",
                    "/Users/tgentet-obrien/",
    ],

should be (no trailing comma after your last workspace):

 "mm_workspace" : [
                    "/Users/tgentet-obrien/SFDC",
                    "/Users/tgentet-obrien/Dune",
                    "/Users/tgentet-obrien/GB",
                    "/Users/tgentet-obrien/"
    ],
tgentet-obrien commented 10 years ago

What an idiot! I could have sworn I removed that -_-

Thanks mate!

joeferraro commented 10 years ago

:+1: