[SERVER-17534] 'AttributeError' issue occurs during building MongoDB v3.0 on the same tree as v2.6 Created: 11/Mar/15  Updated: 17/Apr/15  Resolved: 11/Mar/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.0.0
Fix Version/s: None

Type: Question Priority: Trivial - P5
Reporter: Alexey Butalov Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Dear Team,

I'm MongoDB Ready Partner.
I try to build MongoDB v3.0 for Windows.
I use sources from the v3.0 branch, python 2.7.2(9) and scons 2.3.0.
My Windows version is 8.1 x64.
But I get the error:

scons: Reading SConscript files ...
scons version: 2.3.0
python version: 2 7 2 'final' 0
AttributeError: 'module' object has no attribute 'TestCase':
  File "E:\MongoDB\Source\mongodb\SConstruct", line 608:
    env = Environment(variables=env_vars, **envDict)
  File "C:\Python27\scons-2.3.0\SCons\Environment.py", line 1002:
    apply_tools(self, tools, toolpath)
  File "C:\Python27\scons-2.3.0\SCons\Environment.py", line 106:
    env.Tool(tool)
  File "C:\Python27\scons-2.3.0\SCons\Environment.py", line 1785:
    tool = SCons.Tool.Tool(tool, toolpath, **kw)
  File "C:\Python27\scons-2.3.0\SCons\Tool\__init__.py", line 97:
    module = self._tool_module()
  File "C:\Python27\scons-2.3.0\SCons\Tool\__init__.py", line 112:
    return imp.load_module(self.name, file, path, desc)
  File "E:\MongoDB\Source\mongodb\site_scons\site_tools\mongo_unittest.py", line
 7:
    from buildscripts import smoke
  File "E:\MongoDB\Source\mongodb\buildscripts\smoke\__init__.py", line 4:
    import executor
  File "E:\MongoDB\Source\mongodb\buildscripts\smoke\executor.py", line 15:
    import testers
  File "E:\MongoDB\Source\mongodb\buildscripts\smoke\testers.py", line 18:
    class JSUnitTest(unittest.TestCase):

I can build v2.6 without any problems.

Best regards,
Alex Butalov



 Comments   
Comment by Alexey Butalov [ 11/Mar/15 ]

Hi Andrew,
Thank you. I understood the reason of this issue. I removed the files and building is ok now.
Thank you for your time. The issue is solved.
Alexey

Comment by Andrew Morrow (Inactive) [ 11/Mar/15 ]

Hi -

This problem occurs when you have built the 2.6 branch in the tree, and then switch to the v3.0 or master branches and attempt to rebuild. The simplest fix is to remove any files ending with 'pyc' under the site_scons directory.

Thanks,
Andrew

Generated at Thu Feb 08 03:44:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.