Skip to content

TP0221

Error: module not found

  • module '<m>' not found, with help looked for <path>
  • 'python' is not a module, with help use 'from python import <module>'
  • 'dotnet' is not a module, with help use 'from dotnet.<namespace> import <type>'
  • .NET namespace '<ns>' not found (M21)
  • 'import dotnet.<ns>' needs a name, with help use 'import dotnet.<ns> as <name>' (M43)

From the golden case tests/cases/m43/tp0221_dotted_module.tpn:

tp0221_dotted_module.tpn
# Only .NET namespaces are dotted; modules aren't (SPEC §4.7, §13.1).
import geometry.shapes as shapes

The compiler reports:

tp0221_dotted_module.tpn:2:8: error TP0221: module 'geometry.shapes' not found

The specification lists every code.