--- a/nxs/napi.py
+++ b/nxs/napi.py
@@ -1137,7 +1137,7 @@
 
         Corresponds to NXgetattr(handle,name,data,&length,&storage)
         """
-        if dtype is 'char': length += 1  # HDF4 needs zero-terminator
+        if dtype == 'char': length += 1  # HDF4 needs zero-terminator
         dummy_data,pdata,size,datafn = self._poutput(str(dtype),[length])
         storage = c_int(_nxtype_code[str(dtype)])
         # print("getattr", self._loc(), name, length, size, dtype)
--- a/nxs/tree.py
+++ b/nxs/tree.py
@@ -539,7 +539,7 @@
     The delimiter separating each axis can be white space, a comma, or a colon.
     """
     import re
-    sep=re.compile('[\[]*(\s*,*:*)+[\]]*')
+    sep=re.compile(r'[\[]*(\s*,*:*)+[\]]*')
     return filter(lambda x: len(x)>0, sep.split(axes))
 
 
