OskarHansson / strvalidator

Initial push
5 stars 3 forks source link

Error in `[.enums`(GtkStateType, 1) : Enum values must be strings #11

Closed bendamon closed 7 years ago

bendamon commented 7 years ago

Dear Oskar, I installed str-validator on R 3.4.0, also the necessary packages for str-validator and let me tell you that you did an awesome job on str-validator! Great application, such an effort you must have undergone! Unfortunately, I keep getting an error whenever I want to use the import function in str-validator. Error message in R console: Error in [.enums(GtkStateType, 1) : Enum values must be strings Apparently, jverzani stumbled accross the same error in 2016 and it seems he wrote a fix for this but as the post of jverzani is from 2016 (https://github.com/jverzani/gWidgets2), I am not able to find his bugfix. If this solution by jverzani is a solution to the import error I keep getting on str-validator, that is. I am afraid to say that I have to ask for your advice concerning this error so I would greatly aprreciate any hint I might have overseen or simply overlooked. Please do excuse my asking. Attached you find a screenshot of the enum error. Thank you very much in advance! Kind regards, Jan str-validator_error when import button is activated

IFSLMDNA commented 7 years ago

Hi Oskar, I recently installed STR validator and I am having the same issues. Could you please assist us with resolving this problem. Thanks!

OskarHansson commented 7 years ago

Thanks for reporting the problem here on GitHub.

I can confirm the issue. The source of the bug is the package RGtk2 (version 2.20.33) for R 3.4.0, as described here https://github.com/jverzani/gWidgets2RGtk2/issues/22#issue-234069330 Note that the example use the gWidgets2 package, while version 1.9.0 of strvalidator uses gWidgets. However, the same error is triggered using gWidgets as well.

As the post suggests the bug is not present in version 2.20.31 of RGtk2 so the first thing to try is to downgrade. The previous versions of R packages can be installed using this devtools command:

require(devtools)
install_version("RGtk2", version = "2.20.31", repos = "http://cran.us.r-project.org")

(adapted from https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages) Unfortunately, I get an error trying to install.

Alternatively it is possible to manually download an archived package from https://cran.r-project.org/src/contrib/Archive/RGtk2/ and install using the menu "Packages/Install package(s) from local files..." in the RGui. However, I had problems with that solution too.

Please let me know if any of the suggestions work for you.

@jverzani have fixed the issue in gWidgets2 (the latest developer version can be installed as described in this post https://github.com/davidcsterratt/retistruct/issues/13#issuecomment-309805853 ). This will not solve the issue in strvalidator 1.9.0 since it is using gWidgets (which according to my knowledge does not have a fix).

I am currently working on upgrading strvalidator to use gWidgets2.

jverzani commented 7 years ago

I just pushed the fix to cran yesterday. Apologies for it taking so long.

IFSLMDNA commented 7 years ago

Hi guys, Thanks for your speedy responses. I must admit I am very new to the world of programming and coding and as a result I am a little lost as to what would be my next step. I noticed that jverzani response that the fix has been pushed to cran..... does this mean I can try to reinstall STR validator and the packages pulled from cran would automatically now have the fix?

OskarHansson commented 7 years ago

@IFSLMDNA it means that @jverzani submitted an updated version of gWidgets to cran - the servers from where you usually install packages from within the RGui. However, it does not seem to be online yet https://cran.r-project.org/package=gWidgets as the latest version was published in 2014. Once online you should be able to update gWidgets (RGui menu: Packages/Update packages..). The new version should fix the problem in strvalidator.

jverzani commented 7 years ago

Sorry, I updated gWidgets2RGtk2. Let me see if I can get gWidgetsRGtk2 updated and past the CRAN checks.

jverzani commented 7 years ago

I believe an update to gWidgetsRGtk2 is on CRAN now that will fix this issue with Enums.

IFSLMDNA commented 7 years ago

Thanks a lot! I tried it and it now works. I really appreciate the effort.

jverzani commented 7 years ago

Happy to do so, thanks for letting me know about the issue.

On Tue, Jul 18, 2017 at 11:49 AM, IFSLMDNA notifications@github.com wrote:

Thanks a lot! I tried it and it now works. I really appreciate the effort.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/OskarHansson/strvalidator/issues/11#issuecomment-316107862, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZvTMkSNACs5GDY8B9eAEXmeRQiewgdks5sPNP4gaJpZM4OQ18D .

IFSLMDNA commented 7 years ago

Hi John and Oskar, I am having another problem. So after reinstalling STR validator, I was able to successfully import both the tutorial samples "set3" and "ref3, as well as, some validation samples from within the lab. However, while I was able to complete some stutter analyses, I am having some issues with the "Edit" tabs. Whenever I click on "Edit" either from the "tools" tab or from with the "stutter" tab, I am unable to see my data after selecting the dataset. It says "no data" and I receive an error message within RGui. Could you assist me with correcting this isssue as well? Thanks

error message 180717 error- edit tab 180717

jverzani commented 7 years ago

Hmm, I'm not sure where this issue lies, as I'm not famiiar with the code base of strvalidator. I know there was an issue with deleting components that was reported, could it be related to that? (Someone mentioned downgrading RGtk2 helped there)

OskarHansson commented 7 years ago

Thanks @jverzani for fixing the enumeration issue. @IFSLMDNA, I have not seen that error before. It may be something else in strvalidator that was broken after the RGtk2 update (presumably a quite large update since it no longer supports R <3.4). Is it possible to view the data using the View button from the workspace tab? If not, try the above mentioned alternatives to downgrade RGtk2.

I am currently working through the tutorial to make sure everything works in the new version of strvalidator, using gWidgets2 and the most recent versions of all dependencies. Some widgets seem to have changed behaviour slightly (e.g. the gdf and gtable used to edit/view data). If you are unable to downgrade I can upload the development version on GitHub for you to try.

Edit: using a older 32-bit working installation (R version 3.2.3, gWidgetsRGtk2_0.0-83, gWidgets_0.0-54, RGtk2_2.20.31, and strvalidator_1.7.0) and then upgrading (R version 3.4.1, gWidgetsRGtk2_0.0-84, gWidgets_0.0-54, RGtk2_2.20.33, and strvalidator_1.9.0) I confirmed that the enumeration issue was fixed by @jverzani. I can also confirm that the error discovered by @IFSLMDNA was introduced with this setup. An immediate workaround is to use the View button in the Workspace tab.

OskarHansson commented 7 years ago

The just released STR-validator version 2.0.0 adapted for gWidgets2 does not have this problem.