-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CheckVersion causes failed execution #66
Comments
Try putting an empty text file called |
Thanks for bringing the toolbox title/label issue to our attention! I had not noticed that before. I will remove the version number and just leave it to report 'GeMS Tools for 10.5'. At one point I was having the script report the URL to the repo but took it out when I saw it was not a hyperlink in the messages. Still, easily copied, so I will put it back in. |
Used the gems download of today, checked that __init__.py is in Scripts Folder.
It is of the Size 0KB
But still received the following error:
Executing: ProjectCrossSectionData W:\DATABASE_MAPS\24K\StateMap2020\ElkCityArea\Orogrande\fieldmap\OrograndeGeologicMap.mdb true # W:\DATABASE_MAPS\24K\StateMap2020\ElkCityArea\Orogrande\DEM\orograndeclip W:\DATABASE_MAPS\24K\StateMap2020\ElkCityArea\Orogrande\fieldmap\OrograndeGeologicMap.mdb\GeologicMap\CartographicLines UPPER_LEFT A 1 250 false false W:\DATABASE_MAPS\24K\StateMap2020\ElkCityArea\Orogrande\fieldmap\scratch.mdb true
Start Time: Fri Apr 23 09:33:11 2021
Running script ProjectCrossSectionData...
Failed script ProjectCrossSectionData...
Traceback (most recent call last):
File "W:\Re_tool_stuff\2021Gems\gems-tools-arcmap-1.6.1\Scripts\GeMS_ProjectCrossSectionData_Arc10.py", line 34, in <module>
checkVersion(versionString, rawurl, 'gems-tools-arcmap')
NameError: name 'checkVersion' is not defined
Failed to execute (ProjectCrossSectionData).
Failed at Fri Apr 23 09:33:11 2021 (Elapsed Time: 0.09 seconds)
From: Evan Thoms ***@***.***>
Sent: Thursday, April 22, 2021 8:51 PM
To: usgs/gems-tools-arcmap ***@***.***>
Cc: Tedrow, Linda ***@***.***) ***@***.***>; Author ***@***.***>
Subject: Re: [usgs/gems-tools-arcmap] CheckVersion causes failed execution (#66)
Try putting an empty text file called __init__.py in the Scripts folder alongside all of the tool files. For some reason it's not required for me with my setup but might be for others.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/usgs/gems-tools-arcmap/issues/66*issuecomment-825366222__;Iw!!JYXjzlvb!1stvJYWnapssV12ma8NhFVm0FqHdLGVukbcjkUBOhqZhZ49kvTZUVgiZ_uFcNTx0$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AKYEVB55EREMJ44TVT2UTTTTKDVAPANCNFSM43NNOFTA__;!!JYXjzlvb!1stvJYWnapssV12ma8NhFVm0FqHdLGVukbcjkUBOhqZhZ49kvTZUVgiZ_lBQIFGS$>.
|
I'm sorry. Go get the latest version again (same number v1.6.1). I found a syntax error that might have been the problem. That's fine that the init file is empty. It can have special instructions in it, but doesn't need to. If this doesn't work try this: open GeMS_ProjectCrossSectionData_Arc10.py in a text editor and comment out the line that calls checkVersion, that is, make it read
and if my guess is right, that for some reason the script cannot find GeMS_utilityFunctions.py, then you will get an error at line 146 when it tries to call addMsgAndPrint. |
Evan,
I had tried to comment this out before both in this script and others has not really been successful.
This time by commenting out, I did get it to go past this check version block in the crosssection tool
– ( I agree it is like it is not finding the script in the utility functions module. )
I tried
import arcpy, sys, os.path, math
from GeMS_Definition import tableDict
from GeMS_utilityFunctions import *
from GeMS_utilityFunctions import checkVersion
perhaps not the correct way to call directly.
But, again, I got it to run past this just now (twice) but both times the process runs through the lines and points and then sends the
“Cannot get exclusive schema lock” junk.
[Graphical user interface, text, application, email Description automatically generated]
I have reboot twice; checked that nobody else had open; moved to my C drive.
To no avail.
Went back to your profile code from before GeMS.
Linda
From: Evan Thoms ***@***.***>
Sent: Friday, April 23, 2021 10:49 AM
To: usgs/gems-tools-arcmap ***@***.***>
Cc: Tedrow, Linda ***@***.***) ***@***.***>; Author ***@***.***>
Subject: Re: [usgs/gems-tools-arcmap] CheckVersion causes failed execution (#66)
I'm sorry. Go get the latest version again (same number v1.6.1). I found a syntax error that might have been the problem.
That's fine that the init file is empty. It can have special instructions in it, but doesn't need to.
If this doesn't work try this: open GeMS_ProjectCrossSectionData_Arc10.py in a text editor and comment out the line that calls checkVersion, that is, make it read
# checkVersion(versionString, rawurl, 'gems-tools-arcmap')
and if my guess is right, that for some reason the script cannot find GeMS_utilityFunctions.py, then you will get an error at line 146 when it tries to call addMsgAndPrint.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/usgs/gems-tools-arcmap/issues/66*issuecomment-825818588__;Iw!!JYXjzlvb!0fbCt-hONkVAEXQhNM3xFxQHHtMFMvW90_5ld3ShabeGpuPuwhVY3SuRHTh462p1$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AKYEVB2XPSV3O7SZ53Y3EI3TKGXHBANCNFSM43NNOFTA__;!!JYXjzlvb!0fbCt-hONkVAEXQhNM3xFxQHHtMFMvW90_5ld3ShabeGpuPuwhVY3SuRHRmV6W5M$>.
|
Same problem with validate database
In pythonWin fixed the string on line 36
#checkVersion(versionString, rawurl, 'gems-tools-arcmap')
Results:
.. . . GeMS_ValidateDatabase_Arc10.py”, line 876 in <module>
If not arcpy.Exists(refgmd):
Attribute Error: ‘module’ object has no attribute ‘Exists’
Failed to execute ValidateDatabase2
Also of note line 34:
versionString = 'GeMS_ValidateDatabase_Arc10.py, version of 8 March 2021'
From: Evan Thoms ***@***.***>
Sent: Friday, April 23, 2021 10:49 AM
To: usgs/gems-tools-arcmap ***@***.***>
Cc: Tedrow, Linda ***@***.***) ***@***.***>; Author ***@***.***>
Subject: Re: [usgs/gems-tools-arcmap] CheckVersion causes failed execution (#66)
I'm sorry. Go get the latest version again (same number v1.6.1). I found a syntax error that might have been the problem.
That's fine that the init file is empty. It can have special instructions in it, but doesn't need to.
If this doesn't work try this: open GeMS_ProjectCrossSectionData_Arc10.py in a text editor and comment out the line that calls checkVersion, that is, make it read
# checkVersion(versionString, rawurl, 'gems-tools-arcmap')
and if my guess is right, that for some reason the script cannot find GeMS_utilityFunctions.py, then you will get an error at line 146 when it tries to call addMsgAndPrint.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/usgs/gems-tools-arcmap/issues/66*issuecomment-825818588__;Iw!!JYXjzlvb!0fbCt-hONkVAEXQhNM3xFxQHHtMFMvW90_5ld3ShabeGpuPuwhVY3SuRHTh462p1$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AKYEVB2XPSV3O7SZ53Y3EI3TKGXHBANCNFSM43NNOFTA__;!!JYXjzlvb!0fbCt-hONkVAEXQhNM3xFxQHHtMFMvW90_5ld3ShabeGpuPuwhVY3SuRHRmV6W5M$>.
|
The Attribute Error getting thrown, that 'Exists' can't be found in the arcpy module, is worrying. What version of ArcMap are you using? |
Evan,
We are using version 10.5
I agree -- and I wrote a couple scripts to test the Exists function – It worked.
We had a student develop a tool bar of the GeMS tools, that is in testing. Did get this to run from the tool bar.
Curious!
Linda
From: Evan Thoms ***@***.***>
Sent: Wednesday, May 12, 2021 6:09 PM
To: usgs/gems-tools-arcmap ***@***.***>
Cc: Tedrow, Linda ***@***.***) ***@***.***>; Author ***@***.***>
Subject: Re: [usgs/gems-tools-arcmap] CheckVersion causes failed execution (#66)
The Attribute Error getting thrown, that 'Exists' can't be found in the arcpy module, is worrying. What version of ArcMap are you using?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/usgs/gems-tools-arcmap/issues/66*issuecomment-840209969__;Iw!!JYXjzlvb!z4PwDps6g0DKSs0DJ7fH0VRdu_awm3YTVeLw8jIg48A7kVc1nZGrHGi_TsychJbk$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AKYEVB2TB3JB4NRZ3HPM7ZLTNMRBPANCNFSM43NNOFTA__;!!JYXjzlvb!z4PwDps6g0DKSs0DJ7fH0VRdu_awm3YTVeLw8jIg48A7kVc1nZGrHGi_TnkXQWey$>.
|
Hmm, do you know if there are other versions of python installed on the computer? Perhaps there are conflicting namespaces. |
No – there should not be any other versions of Python on computer that I am using –
The version of python is the version that comes with arcMap
I could try running on another machine to see if it causes similar problems.
The version of Python used in ArcMap is different than that of ArcPro – which I am sure you are aware of.
The only way I could think of “a repair” would be to reinstall.
But would wait on that and update to a more current version of ArcMap next month.
From: Evan Thoms ***@***.***>
Sent: Thursday, May 13, 2021 10:38 AM
To: usgs/gems-tools-arcmap ***@***.***>
Cc: Tedrow, Linda ***@***.***) ***@***.***>; Author ***@***.***>
Subject: Re: [usgs/gems-tools-arcmap] CheckVersion causes failed execution (#66)
Hmm, do you know if there are other versions of python installed on the computer? Perhaps there are conflicting namespaces.
Can you upgrade or do a repair?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/usgs/gems-tools-arcmap/issues/66*issuecomment-840717001__;Iw!!JYXjzlvb!xAbVDQwohRwuzr2dbunIaIGG824uubDqgZRLzC00qEDwB7xbWFZn0Cg9mFfUMmWo$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AKYEVB55SOGK7BI2QXVEZQLTNQE6HANCNFSM43NNOFTA__;!!JYXjzlvb!xAbVDQwohRwuzr2dbunIaIGG824uubDqgZRLzC00qEDwB7xbWFZn0Cg9mIf_1USV$>.
|
Since the introduction of the check version the tools have mostly failed.

Also of note, when freshly downloaded the Toolbox Title does not change -- it continues to be GeMS Tools for 10.5 2021-02-02
Suggest updating this with each new version and when CheckVersion causes failure a url to the exact location for the latest would be helpful.
The text was updated successfully, but these errors were encountered: