vhf/confusable_homoglyphs

raise Exception('Datafile not found, datafile generation failed!') gives no debugging path

duaneking opened this issue · 6 comments

Currently, hitting the Absolutely EVIL 'Datafile not found, datafile generation failed!' error in version 3.0.0 of the library.

That's it, that's all the debugging data I get. And that's the problem, I should be giving the path its looking for it and failing to find it as well. But I'm not.

The worst part about being 100% blocked on a Django deployment is that I have no idea where it's looking for the file in question-based on the error message alone, if its a permissions issue, or whatever.. I'm just getting the same worthless Django exception over and over with no debug data that's relevant, no CLI docs for the package, and no way out. Double checked docs.

Files are as they should be, on the correct path.. or at least, they work in that path on one system. Since I have no way to know what the second system is expecting (due to the lack of debugging path data in the exception) I'm just trying to make sure everything else matches.. and it does according to sha1/md5 hashes hashes. Yet, I still get the same exception and that same exception gives me no data to go off of to improve my situation.

And really, these data files should be in the lib and something I shouldn't have to mess with.

I also checked stack overflow, and only found this https://stackoverflow.com/questions/46512148/datafile-not-found-datafile-generation-failed-in-confusable-homoglyphs-categori but I have the files on disk.

Desired fix:

  • Include paths used and not found in the exception message.
  • Include the files in question in the library so they don't violate DRY and SOLID and can keep a good separation of concerns without having to clutter up thousands if not millions of projects that use django and thus use this library.
vhf commented

I'll have to find a way to deprecate the version you are using. You will still have it locally though, so you will need to install it again, at the latest version.

"pip install -I packagename" usually works great and ignores the prior installed version; if you not supporting that you should.

I ended up editing the confusable_homoglyphs locally to get the path.. it turns out that it was also injecting the path to look for the files from Apache, so it was not an easy fix for most people; I ended up just copying the files to the / root of the drive because that is where the module expected them to be for some odd reason... and people who can't do that are then 100% blocked due to hosting options. Lucky for me this a simple demo project and I didn't care, and I had root on the box, etc. People using a standard hosting company don't have that option.

It would really help people if these files could be considered static/global and set in with the module itself in a dedicated, consistent place that does not change based on the project or otherwise doesn't need to be included in somebody's personal project.

vhf commented

Could you please include the output of pip freeze in this issue?

$ pip freeze | grep confusable-homoglyphs
confusable-homoglyphs==3.0.0

vhf commented

This is very surprising. The error message Datafile not found, datafile generation failed! does not exist in version 3.0.0.

Please create a repository with a minimal reproduction of the issues you're encountering. That will help me understand the problem and how to solve it.

I noticed this few days back tried this https://stackoverflow.com/a/47766855/3426424