mayapy/maya.standalone error: No object matches name: .aiTranslator - maya

When I run this in mayapy:
import maya.standalone
maya.standalone.initialize()
import maya.cmds as cmds
cmds.file("/Users/Desktop/test.ma", open=True, force=True)
Then I get this error:
RuntimeError: file: /Users/Desktop/dad.ma line 26: The camera 'perspShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 26: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 43: The camera 'topShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 43: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 59: The camera 'frontShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 59: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 76: The camera 'sideShape' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 76: setAttr: No object matches name: .aiTranslator
file: /Users/Desktop/test.ma line 90: The mesh 'pSphereShape1' has no '.aiTranslator' attribute.
file: /Users/Desktop/test.ma line 90: setAttr: No object matches name: .aiTranslator
Error reading file.
Error reading file.
But when I run this in maya:
import maya.cmds as cmds
cmds.file("/Users/Desktop/test.ma", open=True, force=True)
Then executes just fine.
test.ma is just a new scene with one object in, nothing fancy. For some reason, running this trough the mayapy/maya.standalone I get this error

You probably need to check if mtoa is loaded or not. If not loaded then load it before opening the file.
import maya.standalone
maya.standalone.initialize()
import maya.cmds as cmds
if not cmds.pluginInfo("mtoa.so", q=True, loaded=True):
cmds.loadPlugin("mtoa.so")
cmds.file("/Users/Desktop/test.ma", open=True, force=True)

Related

Chromedriver not found in path but I can open in the terminal and ChromeDriverManager gives me and error

I'm new to coding but have been using selenium for chrome in python fine for a few weeks, I don't know what I changed but I am now getting an error message.
I simplified it as much as I can to see what I'm doing wrong, but I can't work it out.
from selenium import webdriver
driver = webdriver.Chrome(r"C:\Users\smim1\PycharmProjects\test\chromedriver.exe")
Error:
Traceback (most recent call last):
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\selenium\webdriver\common\service.py", line 71, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Users\smim1\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 832, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "C:\Users\smim1\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1294, in _get_handles
c2pwrite = msvcrt.get_osfhandle(self._get_devnull())
File "C:\Users\smim1\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1077, in _get_devnull
self._devnull = os.open(os.devnull, os.O_RDWR)
FileNotFoundError: [Errno 2] No such file or directory: 'nul'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\smim1\PycharmProjects\test\test5.py", line 43, in <module>
driver = webdriver.Chrome(service = s)
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in __init__
self.service.start()
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://chromedriver.chromium.org/home
But when I open that file location in the terminal it starts successfully:
PS C:\Users\smim1\PycharmProjects\test> C:\Users\smim1\PycharmProjects\test\chro
medriver.exe
Starting ChromeDriver 101.0.4951.41 (93c720db8323b3ec10d056025ab95c23a31997c9-re
fs/branch-heads/4951#{#904}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggest
ions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
My chrome is the same build:
Chrome is up to date
Version 101.0.4951.54 (Official Build) (64-bit)
I have also tried to move it to the project folder and remove the path but it comes up with the same error
I have tried the webdriver-manager 3.5.4 but get an error:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
Error:
====== WebDriver manager ======
Traceback (most recent call last):
File "C:\Users\smim1\PycharmProjects\test\test5.py", line 51, in <module>
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\chrome.py", line 32, in install
driver_path = self._get_driver_path(self.driver)
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\manager.py", line 19, in _get_driver_path
binary_path = self.driver_cache.find_driver(driver)
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\driver_cache.py", line 74, in find_driver
driver_version = driver.get_version()
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\driver.py", line 39, in get_version
self.get_latest_release_version()
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\driver.py", line 65, in get_latest_release_version
self.browser_version = get_browser_version_from_os(self.chrome_type)
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\utils.py", line 144, in get_browser_version_from_os
OSType.WIN: windows_browser_apps_to_cmd(
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\utils.py", line 125, in windows_browser_apps_to_cmd
powershell = determine_powershell()
File "C:\Users\smim1\PycharmProjects\test\venv\lib\site-packages\webdriver_manager\utils.py", line 245, in determine_powershell
with subprocess.Popen(
File "C:\Users\smim1\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 832, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "C:\Users\smim1\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1276, in _get_handles
p2cread = msvcrt.get_osfhandle(self._get_devnull())
File "C:\Users\smim1\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1077, in _get_devnull
self._devnull = os.open(os.devnull, os.O_RDWR)
FileNotFoundError: [Errno 2] No such file or directory: 'nul'
I'm sure there is something simple that I am doing wrong but I have tried everything I can find online

Error while uploading csv to Google App Engine

I am trying to upload a csv file to GAE but having errors.
I am following this blog post and using same yml file. I can download data but upload command is giving following errors:
C:\Users\ADMIN>appcfg.py upload_data --config_file=C:\bulk\config.yml --file
name=C:\bulk\data.csv --url=http://encryptedsearch.appspot.com/remote_api --appl
ication=encryptedsearch --kind=Greeting
06:44 PM Uploading data records.
[INFO ] Logging to bulkloader-log-20151206.184424
[INFO ] Throttling transfers:
[INFO ] Bandwidth: 250000 bytes/second
[INFO ] HTTP connections: 8/second
[INFO ] Entities inserted/fetched/modified: 20/second
[INFO ] Batch Size: 10
[INFO ] Opening database: bulkloader-progress-20151206.184424.sql3
2015-12-06 18:44:24,763 INFO client.py:669 access_token is expired. Now: 2015-12
-06 13:44:24.763000, token_expiry: 2015-12-05 20:24:05
2015-12-06 18:44:25,891 INFO client.py:669 access_token is expired. Now: 2015-12
-06 13:44:25.891000, token_expiry: 2015-12-05 20:24:05
2015-12-06 18:44:26,576 INFO client.py:669 access_token is expired. Now: 2015-12
-06 13:44:26.577000, token_expiry: 2015-12-05 20:24:05
2015-12-06 18:44:27,687 INFO client.py:669 access_token is expired. Now: 2015-12
-06 13:44:27.687000, token_expiry: 2015-12-05 20:24:05
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 133, in
<module>
run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\appcfg.py", line 129, in
run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 5469, in <module>
main(sys.argv)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 5460, in main
result = AppCfgApp(argv).Run()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 3010, in Run
self.action(self)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 5116, in __call__
return method()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 4919, in PerformUpload
run_fn(args)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\ap
pcfg.py", line 4803, in RunBulkloader
sys.exit(bulkloader.Run(arg_dict, self._GetOAuth2Parameters()))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bu
lkloader.py", line 4349, in Run
return _PerformBulkload(arg_dict, oauth2_parameters)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bu
lkloader.py", line 4211, in _PerformBulkload
loader.finalize()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\bulk
load\bulkloader_config.py", line 383, in finalize
self.reserve_keys(self.keys_to_reserve)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\bu
lkloader.py", line 1211, in ReserveKeys
datastore._GetConnection()._reserve_keys(ConvertKeys(keys))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastor
e\datastore_rpc.py", line 2172, in _reserve_keys
self._async_reserve_keys(None, keys).get_result()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastor
e\datastore_rpc.py", line 2210, in _async_reserve_keys
service_name=_DATASTORE_V4))
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastor
e\datastore_rpc.py", line 1341, in _make_rpc_call
rpc = self._create_rpc(config, service_name)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastor
e\datastore_rpc.py", line 1236, in _create_rpc
rpc = apiproxy_stub_map.UserRPC(service_name, deadline, callback)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apip
roxy_stub_map.py", line 414, in __init__
self.__rpc = CreateRPC(service, stubmap)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apip
roxy_stub_map.py", line 68, in CreateRPC
assert stub, 'No api proxy found for service "%s"' % service
AssertionError: No api proxy found for service "datastore_v4"
I am uploading same file back to datastore which I downloaded with command:
appcfg.py download_data --config_file=C:\bulk\config.yml --filename=C:\bulk\data.csv --kind=Greeting --url=http://encryptedsearch.appspot.com/remote_api --application=encryptedsearch
My config.yml is below:
# Autogenerated bulkloader.yaml file.
# You must edit this file before using it. TODO: Remove this line when done.
# At a minimum address the items marked with TODO:
# * Fill in connector and connector_options
# * Review the property_map.
# - Ensure the 'external_name' matches the name of your CSV column,
# XML tag, etc.
# - Check that __key__ property is what you want. Its value will become
# the key name on import, and on export the value will be the Key
# object. If you would like automatic key generation on import and
# omitting the key on export, you can remove the entire __key__
# property from the property map.
# If you have module(s) with your model classes, add them here. Also
# change the kind properties to model_class.
python_preamble:
- import: base64
- import: re
- import: google.appengine.ext.bulkload.transform
- import: google.appengine.ext.bulkload.bulkloader_wizard
- import: google.appengine.api.datastore
- import: google.appengine.api.users
transformers:
- kind: Greeting
connector: csv
connector_options:
# TODO: Add connector options here--these are specific to each connector.
property_map:
- property: __key__
external_name: key
import_transform: transform.key_id_or_name_as_string
- property: content
external_name: content
# Type: String Stats: 7 properties of this type in this kind.
- property: date
external_name: date
# Type: Date/Time Stats: 7 properties of this type in this kind.
import_transform: transform.import_date_time('%Y-%m-%dT%H:%M:%S')
export_transform: transform.export_date_time('%Y-%m-%dT%H:%M:%S')
- property: name
external_name: name
# Type: String Stats: 7 properties of this type in this kind.
CSV file contents:
content,date,name,key
Hi,2015-12-05T17:24:14,,ahFzfmVuY3J5cHRlZHNlYXJjaHIrCxIJR3Vlc3Rib29rIgdkZWZhdWx0DAsSCEdyZWV0aW5nGICAgICAgIAKDA
3rd,2015-12-05T17:30:04,,ahFzfmVuY3J5cHRlZHNlYXJjaHIrCxIJR3Vlc3Rib29rIgdkZWZhdWx0DAsSCEdyZWV0aW5nGICAgICA8ogKDA
2nd,2015-12-05T17:25:59,,ahFzfmVuY3J5cHRlZHNlYXJjaHIrCxIJR3Vlc3Rib29rIgdkZWZhdWx0DAsSCEdyZWV0aW5nGICAgICA5JEKDA
Datastore entries:
link to image
For all others that are fighting with the same issue. I found that there was no other solution for me than commenting that line in actual client.py.
Solution:
locate the client.py file ( ../google-cloud-sdk/platform/google_cloud/lib/oauth2client/oauth2client/client.py in my case)
navigate to access_token_expired() method
comment following code:
if now >= self.token_expiry:
logger.info('access_token is expired. Now: %s, token_expiry: %s',
now, self.token_expiry)
return True

Change google app engine name

i cloned a working google app engine repo into my local env and got it to work.
Later i decided i wanted to deploy to my own GAE app so i changed the name in app.yaml to the one in my newly created app.
But then when launching it with the GoogleAppEngineLauncher i got this error:
BadRequestError: app "dev~bandtasticnews" cannot access app "dev~noticiashacker"'s data
The original name is noticiashacker and the new one is bandtasticnews, the cloned worked alright online but the dev is broken, i have to change the name on app.yaml to the original if i want it to launch locally and return it before deploying.
There are no more lines on my code referencing the original name, i don't know why is it trying to retrieve it.
UPDATE
Here is the stack trace shown in the GoogleAppEngineLauncher logs
*** Running dev_appserver with the following flags:
--skip_sdk_update_check=yes --port=8080 --admin_port=8000 --clear_datastore=yes
Python command: /usr/bin/python2.7
INFO 2013-04-24 00:45:10,683 devappserver2.py:498] Skipping SDK update check.
WARNING 2013-04-24 00:45:10,690 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-04-24 00:45:10,693 api_server.py:152] Starting API server at: http://localhost:50495
INFO 2013-04-24 00:45:10,700 dispatcher.py:150] Starting server "default" running at: http://localhost:8080
INFO 2013-04-24 00:45:10,706 admin_server.py:117] Starting admin server at: http://localhost:8000
/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/mtime_file_watcher.py:82: UserWarning: There are too many files in your application for changes in all of them to be monitored. You may have to restart the development server to see some changes to your files.
'There are too many files in your application for '
ERROR 2013-04-24 00:45:17,489 webapp2.py:1528] app "dev~bandtasticnews" cannot access app "dev~noticiashacker"'s data
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/Users/grillermo/c/BandtasticNews/Noticias-HAcker/handlers/MainHandler.py", line 85, in get
self.response.out.write(template.render('templates/main.html', locals()))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/template.py", line 92, in render
return t.render(Context(template_dict))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/template.py", line 172, in wrap_render
return orig_render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 173, in render
return self._render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 167, in _render
return self.nodelist.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 794, in render
bits.append(self.render_node(node, context))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 807, in render_node
return node.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/loader_tags.py", line 125, in render
return compiled_parent._render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 167, in _render
return self.nodelist.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 794, in render
bits.append(self.render_node(node, context))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 807, in render_node
return node.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/defaulttags.py", line 257, in render
return self.nodelist_true.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 794, in render
bits.append(self.render_node(node, context))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 807, in render_node
return node.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 842, in render
output = self.filter_expression.resolve(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 551, in resolve
obj = self.var.resolve(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 694, in resolve
value = self._resolve_lookup(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 729, in _resolve_lookup
current = current()
File "/Users/grillermo/c/BandtasticNews/Noticias-HAcker/models.py", line 73, in sum_votes
self.put()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py", line 1070, in put
return datastore.Put(self._entity, **kwargs)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore.py", line 579, in Put
return PutAsync(entities, **kwargs).get_result()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 604, in get_result
return self.__get_result_hook(self)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1569, in __put_hook
self.check_rpc_success(rpc)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1224, in check_rpc_success
raise _ToDatastoreError(err)
BadRequestError: app "dev~bandtasticnews" cannot access app "dev~noticiashacker"'s data
INFO 2013-04-24 00:45:17,532 recording.py:673] Saved; key: __appstats__:017200, part: 157 bytes, full: 69853 bytes, overhead: 0.003 + 0.031; link: http://localhost:8080/_ah/stats/details?time=1366764317201
ERROR 2013-04-24 00:45:17,538 cgi.py:121] Traceback (most recent call last):
File "/Users/grillermo/c/BandtasticNews/Noticias-HAcker/main.py", line 91, in <module>
main()
File "/Users/grillermo/c/BandtasticNews/Noticias-HAcker/main.py", line 86, in main
util.run_wsgi_app(application)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/util.py", line 98, in run_wsgi_app
run_bare_wsgi_app(add_wsgi_middleware(application))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/util.py", line 118, in run_bare_wsgi_app
for data in result:
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/appstats/recording.py", line 1284, in appstats_wsgi_wrapper
result = app(environ, appstats_start_response)
File "/Users/grillermo/c/BandtasticNews/Noticias-HAcker/gaesessions/__init__.py", line 451, in __call__
return self.app(environ, my_start_response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1519, in __call__
response = self._internal_error(e)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1511, in __call__
rv = self.handle_exception(request, response, e)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1505, in __call__
rv = self.router.dispatch(request, response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher
return route.handler_adapter(request, response)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 1077, in __call__
return handler.dispatch()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 547, in dispatch
return self.handle_exception(e, self.app.debug)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/Users/grillermo/c/BandtasticNews/Noticias-HAcker/handlers/MainHandler.py", line 85, in get
self.response.out.write(template.render('templates/main.html', locals()))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/template.py", line 92, in render
return t.render(Context(template_dict))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/template.py", line 172, in wrap_render
return orig_render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 173, in render
return self._render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 167, in _render
return self.nodelist.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 794, in render
bits.append(self.render_node(node, context))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 807, in render_node
return node.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/loader_tags.py", line 125, in render
return compiled_parent._render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 167, in _render
return self.nodelist.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 794, in render
bits.append(self.render_node(node, context))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 807, in render_node
return node.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/defaulttags.py", line 257, in render
return self.nodelist_true.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 794, in render
bits.append(self.render_node(node, context))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 807, in render_node
return node.render(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 842, in render
output = self.filter_expression.resolve(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 551, in resolve
obj = self.var.resolve(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 694, in resolve
value = self._resolve_lookup(context)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/_internal/django/template/__init__.py", line 729, in _resolve_lookup
current = current()
File "/Users/grillermo/c/BandtasticNews/Noticias-HAcker/models.py", line 73, in sum_votes
self.put()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/db/__init__.py", line 1070, in put
return datastore.Put(self._entity, **kwargs)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore.py", line 579, in Put
return PutAsync(entities, **kwargs).get_result()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 604, in get_result
return self.__get_result_hook(self)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1569, in __put_hook
self.check_rpc_success(rpc)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1224, in check_rpc_success
raise _ToDatastoreError(err)
BadRequestError: app "dev~bandtasticnews" cannot access app "dev~noticiashacker"'s data
UPDATE
Tried it on a different computer and it was the same thing, but this time i tried to run the app without ever having the name noticiashacker on it.
UPDATE
The app.yaml
application: bandtasticnews
version: 5
runtime: python27
api_version: 1
threadsafe: false
libraries:
- name: django
version: "1.3"
builtins:
- appstats: on
- remote_api: on
handlers:
- url: /favicon.ico
static_files: static/favicon.ico
upload: static/favicon.ico
- url: /robots.txt
static_files: static/robots.txt
upload: static/robots.txt
- url: /reports/.*
script: reports.py
login: admin
- url: /tasks/send_top_to_twitter
script: crons.py
login: admin
- url: /tasks/send_to_killmetrics
script: crons.py
login: admin
- url: /tasks/update_top_karma
script: crons.py
login: admin
- url: /tasks/cleanup_sessions
script: crons.py
login: admin
- url: /favicon.ico
static_files: static/favicon.ico
upload: static/favicon.ico
- url: /robots.txt
static_files: static/robots.txt
upload: static/robots.txt
- url: /static
static_dir: static
- url: /admin/.*
script: admin.py
login: admin
- url: .*
script: main.py
Maybe try this, first download your app to a new directory
appcfg.py download_app -A <your_app_id> -V <your_app_version> <output-dir>
Create a new app.yaml with the app id you want to use (don't copy it but create it new)
then run dev_appserver ./
good luck
You have data from the old appid in the dev datastore.
You need to clear you local datastore with --clear_datastore when you start the dev server. Not sure how you do that in the Launcher (never use it)
Try logging in to admin console,
http://localhost:8888/_ah/admin
while keeping the original name, you can see some data in datastore viewer, clear it off (for all types of entities), stop the dev-server and change the name to new one, and start again. It should work.
The problem is with namespaces, the way google separates data between multiple applications. Some of your data is persisted with old namespace which is not getting deleted.
In my case, simply deleting the cookie solves the problem. I found this solution after that I observed that Chrome incognito mode had no problem with it.

GAE can't import Web.py module in virtualenv

I'm trying to set up a Web.py (0.37) project in a virtualenv to run on Google App Engine (1.7.2) but I'm getting a ImportError: No module named web from the appserver.
I've installed web.py using python setup.py install from inside my virtualenv and can confirm that it's installed properly because I can import it from the python interpreter.
My actual GAE folder is outside the virtualenv but linked like so:
ln -s ~/Development/google_appengine $VIRTUAL_ENV/google_appengine
and added to my python path in $VIRTUAL_ENV/lib/python2.7/site-packages/gae.pth
There must be an extra step I'm missing, heres the error message:
ERROR 2012-10-03 09:03:17,442 wsgi.py:203]
Traceback (most recent call last):
File "/home/sett/Development/google_appengine/google/appengine/runtime/wsgi.py", line 195, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/home/sett/Development/google_appengine/google/appengine/runtime/wsgi.py", line 239, in _LoadHandler
handler = __import__(path[0])
File "/home/sett/Development/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 719, in Decorate
return func(self, *args, **kwargs)
File "/home/sett/Development/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1923, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/sett/Development/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 719, in Decorate
return func(self, *args, **kwargs)
File "/home/sett/Development/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1787, in FindAndLoadModule
description)
File "/home/sett/Development/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 719, in Decorate
return func(self, *args, **kwargs)
File "/home/sett/Development/google_appengine/google/appengine/tools/dev_appserver_import_hook.py", line 1730, in LoadModuleRestricted
description)
File "/home/sett/wip/rigmarolesoup/main.py", line 1, in <module>
import web
ImportError: No module named web
App engine won't let you import 3rd party modules from site-packages; you must copy web.py into your app directory.

How do I add a new model and generate the migrations with South 0.7.2?

I created a new model:
class RssFeed(models.Model):
url = mdels.CharField(max_length=300)
$ python manage.py schemamigration forum --add-model RssFeed
Traceback (most recent call last):
File "manage.py", line 13, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.7/site-packages/Django-1.2.3-py2.7.egg/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/site-packages/Django-1.2.3-py2.7.egg/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/Django-1.2.3-py2.7.egg/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/site-packages/Django-1.2.3-py2.7.egg/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/South-0.7.2-py2.7.egg/south/management/commands/schemamigration.py", line 134, in handle
for action_name, params in change_source.get_changes():
File "/usr/local/lib/python2.7/site-packages/South-0.7.2-py2.7.egg/south/creator/changes.py", line 397, in get_changes
real_fields, meta, m2m_fields = self.split_model_def(model, model_defs[model_key(model)])
File "/usr/local/lib/python2.7/site-packages/South-0.7.2-py2.7.egg/south/creator/freezer.py", line 58, in model_key
return "%s.%s" % (model._meta.app_label, model._meta.object_name.lower())
AttributeError: 'NoneType' object has no attribute '_meta'
My syntax was correct, the way I had created the model wasn't.
I had placed all my models into a directory /models
If you do this, you must add Meta to your model definition:
class Meta:
app_label = 'APP_NAME'
If you don't do this, Django can't discover the new models.

Resources