Python Forum
“NameError” “is not defined” script that I know works on other computers
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
“NameError” “is not defined” script that I know works on other computers
#1
This question isn't that much about coding since the scripts seem to work on Win10. I only have troubles trying to run them on my mac. Some background: I installed some Python versions earlier when I tried to learn some basic coding but after getting errors running these scripts I uninstalled everything (except osx-included 2.7.16) But I still got the same outcome. Here are some links to the scripts/apps:

https://github.com/corpnewt/ProperTree

https://github.com/corpnewt/CPUFriendFriend

I know the ProperTree uses Tkinter but executing the .command this is all I get.

Error:
Last login: Mon Nov 23 16:33:08 on ttys000 /Volumes/\[Storage\]/OSX\ FIX/ProperTree-master/ProperTree.command ; exit; andersbergman@Anderss-iMac ~ % /Volumes/\[Storage\]/OSX\ FIX/ProperTree-master/ProperTree.command ; exit; DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Exception in Tkinter callback Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1547, in __call__ return self.func(*args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 596, in callit func(*args) File "/Volumes/[Storage]/OSX FIX/ProperTree-master/ProperTree.command", line 206, in <lambda> self.tk.after(250, lambda:self.check_open(plists)) File "/Volumes/[Storage]/OSX FIX/ProperTree-master/ProperTree.command", line 244, in check_open self.start_window = self.new_plist() File "/Volumes/[Storage]/OSX FIX/ProperTree-master/ProperTree.command", line 484, in new_plist window = plistwindow.PlistWindow(self, self.tk) NameError: global name 'plistwindow' is not defined
CPUFriendsFriend.command and get similar error:

Error:
Traceback (most recent call last): File "/Volumes/[Storage]/OSX FIX/CPUFriendFriend-master/CPUFriendFriend.py", line 338, in <module> c = CPUFF() File "/Volumes/[Storage]/OSX FIX/CPUFriendFriend-master/CPUFriendFriend.py", line 7, in __init__ self.u = utils.Utils("CPUFriendFriend") NameError: name 'utils' is not defined [Process completed]
Could it be a problem with the installation Python/Tkinter ?

I tried google "nameError: global name is not defined"... and directs me to different coding forums where people having problems with their scripts... But I hardly think that the coders of ProperTree, CPUFriendFriend done anything wrong... I would be very thankful for any help. Oh I'm on Catalina 10.15.7 by the way. Thanks
Larz60+ write Nov-24-2020, 04:49 PM:
Changed 'quote' tags to 'error' tags.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I'm getting a NameError: ...not defined. vonArre 2 155 Mar-24-2024, 10:25 PM
Last Post: vonArre
  Getting NameError for a function that is defined JonWayn 2 1,056 Dec-11-2022, 01:53 PM
Last Post: JonWayn
Question Help with function - encryption - messages - NameError: name 'message' is not defined MrKnd94 4 2,775 Nov-11-2022, 09:03 PM
Last Post: deanhystad
  [split] NameError: name 'csvwriter' is not defined. Did you mean: 'writer'? cathy12 4 3,200 Sep-01-2022, 07:41 PM
Last Post: deanhystad
  NameError: name ‘app_ctrl’ is not defined 3lnyn0 0 1,457 Jul-04-2022, 08:08 PM
Last Post: 3lnyn0
  Accessing same python script from multiple computers bigrockcrasher 1 1,633 May-25-2022, 08:35 PM
Last Post: Gribouillis
  NameError: name 'hash_value_x_t' is not defined Anldra12 5 1,864 May-13-2022, 03:37 PM
Last Post: deanhystad
  NameError: name 'cross_validation' is not defined tmhsa 6 13,182 Jan-17-2022, 09:53 PM
Last Post: TropicalHeat
  Simple Python script, path not defined dubinaone 3 2,654 Nov-06-2021, 07:36 PM
Last Post: snippsat
  NameError: name “x” is not defined ... even though x is defined campjaybellson 7 14,674 Oct-20-2021, 05:39 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020