You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/01/29 00:52:33 UTC

[GitHub] [incubator-tvm] jmorrill commented on issue #4780: [FFI][Windows] Fix hasattr by extracting Python error type from Windows error message

jmorrill commented on issue #4780: [FFI][Windows] Fix hasattr by extracting Python error type from Windows error message
URL: https://github.com/apache/incubator-tvm/pull/4780#issuecomment-579543514
 
 
   @soiferj sorry, I'm late to the party.  Getting over a flu.
   
   Anyways, I think there might be a problem.
   
   On my test, the "`line`" variable is "`AttributeError: relay.Op object has no attributed attrs`".
   On line `206`, `start_pos` returns -1, which causes a return of "`None`";
   
   My issue is fixed if the body of `_find_error_type `is replaced with:
   ```
           end_pos = line.find(":")
           if end_pos == -1:
               return None
           err_name = line[:end_pos]
           if _valid_error_name(err_name):
               return err_name
           return None
   ```
   I'd attempt to fix, but I don't want to break the case you are dealing with.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services