diff --git a/pyphantom/flex.py b/pyphantom/flex.py
index <HASH>..<HASH> 100755
--- a/pyphantom/flex.py
+++ b/pyphantom/flex.py
@@ -385,6 +385,9 @@ class Phantom(object):
 
                 return parse_response(response)
 
+        except AttributeError:
+            logger.warn('Trying to send data without connection')
+
         except socket.timeout:
             self.disconnect()
             raise ConnectionError("Socket timeout")
Warn if we try to send without a socket