when I click on the program to run it I see the message say : Traceback (most recent call last):
File "employee manager.py", line 388, in <module>
File "tkcalendar\dateentry.py", line 128, in __init__
File "tkcalendar\calendar_.py", line 258, in __init__
File "babel\dates.py", line 351, in get_day_names
File "babel\core.py", line 652, in days
File "babel\core.py", line 363, in _data
File "babel\localedata.py", line 140, in load
File "babel\localedata.py", line 146, in load
ModuleNotFoundError: No module named 'babel.numbers'
I need to open the program
A: More information is most likely needed to solve this
Also, it says: ModuleNotFoundError: No module named 'babel.numbers'
"numbers" is a subscription of babel. If you want to grab a numbers subscription, try doing: from babel import numbers.
Good Luck! I will try to correspond as needed!
Related
Good afternoon! I'm asking for help, I can't figure out python buildozer for a day, I've already prepared everything, and at the final stage, when the "buildozer android debug" command is entered into the terminal, it gives such an error at the end. Can anyone tell me what to do about it and how to fix it?
Here is the error itself:
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in <module>
load_entry_point('buildozer==0.40.dev0', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/__init__.py", line 1071, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/target.py", line 92, in run_commands
func(args)
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/target.py", line 102, in cmd_debug
self.buildozer.prepare_for_build()
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/__init__.py", line 178, in prepare_for_build
self.target.install_platform()
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/targets/android.py", line 666, in install_platform
self._install_android_ndk()
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/targets/android.py", line 459, in _install_android_ndk
cwd=self.buildozer.global_platform_dir)
File "/usr/local/lib/python3.6/dist-packages/buildozer-0.40.dev0-py3.6.egg/buildozer/__init__.py", line 699, in download
urlretrieve(url, filename, report_hook)
File "/usr/lib/python3.6/urllib/request.py", line 1826, in retrieve
block = fp.read(bs)
File "/usr/lib/python3.6/tempfile.py", line 624, in func_wrapper
return func(*args, **kwargs)
ValueError: read of closed file
I tried to find an answer to this question, but so far without success.
I have a whole project folder where Pycharm returns error whenever I try to run a file. If I run them from terminal they all work.
/usr/bin/python /Users/Casper/PycharmProjects/Mayer/Mayer5.py
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 550, in
main()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 532, in main
known_paths = addusersitepackages(known_paths)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 266, in addusersitepackages
user_site = getusersitepackages()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 241, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 230, in getuserbase
from sysconfig import get_config_var
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 104, in
_PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", line 99, in _safe_realpath
return realpath(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 375, in realpath
path, ok = _joinrealpath('', filename, {})
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 400, in _joinrealpath
if not islink(newpath):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 138, in islink
return stat.S_ISLNK(st.st_mode)
AttributeError: 'module' object has no attribute 'S_ISLNK'
From this post, it can be two possible reasons:
Circular dependencies:
If in the first a.py file you import b and in b.py you import a,then you might see this happen. Python will decide by itself which module will be load first.
Module named in your .py is the same as one in Python standard files:
In this case you have to change your module name.
You need to provide more info about your codes so we can figure out which one is the root cause.
Developing a python project on the platform and attempting appengine endpoints.
import endpoints throws google.appengine.api.yaml_errors.EventError: the library "endpoints" is not supported. The full stack trace is below.
Traceback (most recent call last):
File "/home/action/.google_appengine/dev_appserver.py", line 182, in <module>
_run_file(__file__, globals())
File "/home/action/.google_appengine/dev_appserver.py", line 178, in _run_file
execfile(script_path, globals_)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 695, in <module>
main()
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 688, in main
dev_server.start(options)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 525, in start
options.yaml_files)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 556, in __init__
server_configuration = ServerConfiguration(yaml_path)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 82, in __init__
self._yaml_path)
File "/home/action/.google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 272, in _parse_configuration
return appinfo_includes.ParseAndReturnIncludePaths(f)
File "/home/action/.google_appengine/google/appengine/api/appinfo_includes.py", line 63, in ParseAndReturnIncludePaths
appyaml = appinfo.LoadSingleAppInfo(appinfo_file)
File "/home/action/.google_appengine/google/appengine/api/appinfo.py", line 1715, in LoadSingleAppInfo
listener.Parse(app_info)
File "/home/action/.google_appengine/google/appengine/api/yaml_listener.py", line 226, in Parse
self._HandleEvents(self._GenerateEventParameters(stream, loader_class))
File "/home/action/.google_appengine/google/appengine/api/yaml_listener.py", line 177, in _HandleEvents
raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: the library "endpoints" is not supported
in "./app.yaml", line 21, column 1
Start with a non-python project.
Download appengine for Linux python:
curl -O http://googleappengine.googlecode.com/files/google_appengine_1.8.9.zip
Unzip and export directory in ~/.bash_profile:
export PATH="$HOME/google_appengine:$PATH"
Build endpoint python app as described and run dev_appserver.py.
You can't view the Google APIs Explorer when launched from Nitrous.io, unless you port forward, but you can still use as a developing endpoint.
I upgraded my GAE SDK to Version 1.8.5 and cannot generate a discovery file anymore with endpointscfg.py gen_discovery_doc -o.-f rpc .../main.FlyFlap.APi
I get the errors below.
I tried to delete the file google_appengine/lib/cacerts/urlfetch_cacerts.txt and certs.txt like it is suggested here, but it didn't help. Does someone got same problems?
Traceback (most recent call last):
File "/usr/local/bin/endpointscfg.py", line 196, in <module>
run_file(__file__, globals())
File "/usr/local/bin/endpointscfg.py", line 192, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 472, in <module>
sys.exit(main(sys.argv))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 467, in main
args.callback(args)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 348, in _GenDiscoveryDocCallback
output_path, hostname=hostname)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 188, in GenDiscoveryDoc
service_configs = GenApiConfig(service_class_names, hostname=hostname)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/endpointscfg.py", line 144, in GenApiConfig
module_name, base_service_class_name = service_class_name.rsplit('.', 1)
ValueError: need more than 1 value to unpack
updated osx and it works again.
when i do the following code:
family_members =db(db.member.id == membership_id).select
(db.member.name,db.member.id)
family_members.colnames = ('Name','Membership ID')
It cause the following error...
Traceback (most recent call last):
File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
restricted.py", line 184, in restricted
File "/home/abeer/Desktop/resources/web2py/New_version/web2py_src/
web2py/applications/init/views/default/updateMember.html", line 142,
in <module>
File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
globals.py", line 112, in write
File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
html.py", line 103, in xmlescape
File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
sql.py", line 3326, in xml
File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
sqlhtml.py", line 980, in __init__
File "/home/abeer/Desktop/web2py/New_version/web2py_src/web2py/gluon/
sql.py", line 621, in __getattr__
KeyError: '_extra'
P.S. : when i commented the line (family_members.colnames = ('Name','Membership ID')), it works fine, but I don't understand why.
Do not use colnames. That attribute is internal to web2py. Use db.table.field.label='..' or SQLTABLE(rows, headers={...}) depending on what you need.