Skip to content

Commit

Permalink
easyvolcap: import fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dendenxu committed Apr 6, 2024
1 parent 4fc98a1 commit 86e5f2b
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 12 deletions.
3 changes: 2 additions & 1 deletion easyvolcap/dataloaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/dataloaders/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/models/cameras/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/models/networks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/models/networks/embedders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/models/renderers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/models/samplers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/models/supervisors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/runners/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/runners/evaluators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))
3 changes: 2 additions & 1 deletion easyvolcap/runners/visualizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# from . import * # the actual imports
exec(f'from . import {module}')
except Exception as e:
import os
import sys
from easyvolcap.utils.console_utils import *

exception_type, exception_object, exception_traceback = sys.exc_info()
filename = exception_traceback.tb_frame.f_code.co_filename
line_number = exception_traceback.tb_lineno

log(yellow(f'Failed to import {red(filename)}:{line_number}, {red(type(e))}: {red_slim(e)}'))
log(yellow(f'Failed to import {red(basename(filename))}:{red(line_number)}, {red(type(e).__name__)}: {e}'))

0 comments on commit 86e5f2b

Please sign in to comment.