Completion DB needs refresh fails. Lib is corrupt

Jun 2, 2015 at 6:21 PM
Edited Jun 2, 2015 at 6:48 PM
Hi All,

I have been trying to install Anaconda distro and Canopy distro. I am unable to get very far as the intellisense dbase us unable to update.

From the logs I have the following error:

Database at C:\Users\hbedi\AppData\Local\Python Tools\CompletionDB\12.0\2af0f10d-7135-4994-9156-5d01c9c11b7e\3.4 is corrupt or an old version

2015-06-02T16:21:21: Start analysis
2015-06-02T16:21:21: IncludeModulesFromModulePath = win32com
2015-06-02T16:21:21: Deleting 0 files
2015-06-02T16:21:21: Scraping builtin modules
2015-06-02T16:21:21: Command: C:\Users\hbedi\AppData\Local\Enthought\Canopy\User\python.exe "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.1\PythonScraper.py" "C:\Users\hbedi\AppData\Local\Python Tools\CompletionDB\12.0\9a7a9026-48c1-4688-9d5d-e5699d47d074\2.7" "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.1\CompletionDB"
2015-06-02T16:21:21: [WARNING] Errors
ImportError: No module named site
2015-06-02T16:21:21: [ERROR] Failed to scrape builtin modules (Exit Code: 1)
2015-06-02T16:21:21: [ERROR] Analysis failed
System.InvalidOperationException: Failed to scrape builtin modules
at Microsoft.PythonTools.Analysis.PyLibAnalyzer.Scrape()
at Microsoft.PythonTools.Analysis.PyLibAnalyzer.Main(String[] args)

2015-06-02T17:30:37: Start analysis
2015-06-02T17:30:38: IncludeModulesFromModulePath = win32com
2015-06-02T17:30:38: Deleting 0 files
2015-06-02T17:30:38: Scraping builtin modules
2015-06-02T17:30:38: Command: C:\Users\hbedi\AppData\Local\Enthought\Canopy\User\python.exe "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.1\PythonScraper.py" "C:\Users\hbedi\AppData\Local\Python Tools\CompletionDB\12.0\9a7a9026-48c1-4688-9d5d-e5699d47d074\2.7" "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.1\CompletionDB"
2015-06-02T17:30:38: [WARNING] Errors
ImportError: No module named site
2015-06-02T17:30:38: [ERROR] Failed to scrape builtin modules (Exit Code: 1)
2015-06-02T17:30:38: [ERROR] Analysis failed
System.InvalidOperationException: Failed to scrape builtin modules
at Microsoft.PythonTools.Analysis.PyLibAnalyzer.Scrape()
at Microsoft.PythonTools.Analysis.PyLibAnalyzer.Main(String[] args)


Could anyone tell me what to do? I have installed the distros to disk and VisualStudio picks them up in the Python Environment.

Thanks,
Coordinator
Jun 2, 2015 at 11:17 PM
(FYI: We now handle discussions on our github page.)

This looks like a known conflict between Anaconda and Canopy, where it is very difficult to have them both installed at once without one corrupting the other. I would suggest uninstalling both of them, then choosing one or the other.

If you install a Python 3 version of Anaconda then it won't conflict with Canopy, which currently only supports Python 2.
Marked as answer by MrBrightSideUser on 6/3/2015 at 6:40 AM
Jun 3, 2015 at 2:40 PM
Thanks - that solved it.