1

getting a weird error from Model Mommy when I am trying to create a mommy model

GEOSException: Error encountered checking Geometry returned from GEOS C function "GEOSWKBReader_readHEX_r".

Weird thing is that the only goes stuff is in another function - which is actually successfully used by these other functions to create mommy models.

Dhia
  • 10,119
  • 11
  • 58
  • 69
lukeaus
  • 11,465
  • 7
  • 50
  • 60

1 Answers1

0

This error appear erroneous. It appears it had nothing to do directly GEOS.

Rather I was missing a required field that is a foreign key to a models that has a Point field.

This was giving me an error

    dossier = mommy.make('foo.Bar',
                         bar='bar',
                         created=timezone.now())

This fixed the problem

    dossier = mommy.make('foo.Bar',
                         foo='foo',  # required foreign key field
                         bar='bar',
                         created=timezone.now())
lukeaus
  • 11,465
  • 7
  • 50
  • 60