The DataStream.map() function in Flink Python API doesn't work - apache-flink

I'm trying Flink's DataStream API in Python.The env is:
flink: 1.16.0
python package: apache-flink==1.16.0
My code was:
env = StreamExecutionEnvironment.get_execution_environment()
env.set_parallelism(1)
env.enable_checkpointing(1000)
source = KafkaSource.builder() \
.set_bootstrap_servers('xxx') \
.set_topics("xxx") \
.set_group_id("xxx") \
.set_starting_offsets(KafkaOffsetsInitializer.earliest()) \
.set_value_only_deserializer(SimpleStringSchema()) \
.set_property('commit.offsets.on.checkpoint', 'true') \
.build()
stream = env.from_source(source, WatermarkStrategy.no_watermarks(), "team_config_source")
sink = FileSink \
.for_row_format('/opt/result/', Encoder.simple_string_encoder("UTF-8")) \
.with_output_file_config(OutputFileConfig.builder()
.with_part_prefix("team_config")
.with_part_suffix(".json")
.build()) \
.with_rolling_policy(RollingPolicy.default_rolling_policy(part_size=1024 ** 3, rollover_interval=15 * 60 * 1000,
inactivity_interval=5 * 60 * 1000)) \
.build()
def mapping(data):
return data
stream.map(mapping, BasicTypeInfo.STRING_TYPE_INFO()).sink_to(sink)
env.execute()
But Flink gives me this error:
2023-01-18 11:34:34 Traceback (most recent call last):
2023-01-18 11:34:34 File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
2023-01-18 11:34:34 return _run_code(code, main_globals, None,
2023-01-18 11:34:34 File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
2023-01-18 11:34:34 exec(code, run_globals)
2023-01-18 11:34:34 File "/tmp/pyflink/00606d52-b6c1-4e13-b7cb-73ee8e196db6/42be79fb-c8bb-4de1-b0fb-c89a7702cddc/flink_driver.py", line 223, in <module>
2023-01-18 11:34:34 process2()
2023-01-18 11:34:34 File "/tmp/pyflink/00606d52-b6c1-4e13-b7cb-73ee8e196db6/42be79fb-c8bb-4de1-b0fb-c89a7702cddc/flink_driver.py", line 218, in process2
2023-01-18 11:34:34 stream.map(mapping, BasicTypeInfo.STRING_TYPE_INFO()).sink_to(sink)
2023-01-18 11:34:34 File "/opt/flink/opt/python/pyflink.zip/pyflink/datastream/data_stream.py", line 312, in map
2023-01-18 11:34:34 File "/opt/flink/opt/python/pyflink.zip/pyflink/datastream/data_stream.py", line 654, in process
2023-01-18 11:34:34 File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2023-01-18 11:34:34 File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2023-01-18 11:34:34 File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
2023-01-18 11:34:34 File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
2023-01-18 11:34:34 File "<frozen zipimport>", line 259, in load_module
2023-01-18 11:34:34 File "/opt/flink/opt/python/pyflink.zip/pyflink/fn_execution/flink_fn_execution_pb2.py", line 38, in <module>
2023-01-18 11:34:34 AttributeError: 'NoneType' object has no attribute 'message_types_by_name'
It seems this exception was thrown in flink_fn_execution_pb2.py file, so I check the code in the package. The code at the beginning of this file was:
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile('xxx')
_INPUT = DESCRIPTOR.message_types_by_name['Input']
But I also find that the function AddSerializedFile() only returns None. This function in descriptor_pool.py was:
def AddSerializedFile(self, serialized_file_desc_proto):
"""Adds the FileDescriptorProto and its types to this pool.
Args:
serialized_file_desc_proto (bytes): A bytes string, serialization of the
:class:`FileDescriptorProto` to add.
"""
# pylint: disable=g-import-not-at-top
from google.protobuf import descriptor_pb2
file_desc_proto = descriptor_pb2.FileDescriptorProto.FromString(
serialized_file_desc_proto)
self.Add(file_desc_proto)
So the DESCRIPTOR in flink_fn_execution_pb2.py is always None, the map() and flat_map() functions always failed with this exception.
Can anyone help with this problem? Am I using map() in wrong way or it's a bug?

Related

in Djando,When I tried to import my model into my view.py,an error occured

When I tried to import my model into my view.py:
from django.views import generic
from .models import *
class ProductListView(generic.ListView):
template_name="discover.html"
queryset=Product.objects.all()
it showed an error as follow:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/Users/yorkli/Desktop/django-projects/gumroad/djgumroad/config/urls.py", line 9, in <module>
from djgumroad.products.views import *
File "/Users/yorkli/Desktop/django-projects/gumroad/djgumroad/djgumroad/products/views.py", line 2, in <module>
from .models import *
File "/Users/yorkli/Desktop/django-projects/gumroad/djgumroad/djgumroad/products/models.py", line 5, in <module>
class Product(models.Model):
File "/Users/yorkli/Desktop/django-projects/gumroad/venv/lib/python3.10/site-packages/django/db/models/base.py", line 132, in __new__
raise RuntimeError(
RuntimeError: Model class djgumroad.products.models.Product doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
but I did register the app in the INSTALLED_APPS:
LOCAL_APPS = [
"djgumroad.users",
# Your stuff: custom apps go here
"tailwind",
"theme",
"django_browser_reload",
"djgumroad.products",
]
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
Is there other configurations I missed?
I tried to remove the "from .models import Product",it works well,when I put it back,the error shows again.

kiwi-tcms: kiwi_db restarting loop

I am trying to install kiwi-tcms and when I get to step:
docker exec -it kiwi_web /Kiwi/manage.py initial_setup
D:\path\to\kiwi-tcms>docker exec -it kiwi_web /Kiwi/manage.py initial_setup
Applying migrations:
Traceback (most recent call last):
File "/venv/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/venv/lib64/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/venv/lib64/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/django/db/backends/mysql/base.py", line 234, in get_new_connection
connection = Database.connect(**conn_params)
File "/venv/lib64/python3.8/site-packages/MySQLdb/init.py", line 130, in Connect
return Connection(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/MySQLdb/connections.py", line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2005, "Unknown MySQL server host 'db' (-2)")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Kiwi/manage.py", line 12, in
execute_from_command_line(sys.argv)
File "/venv/lib64/python3.8/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/venv/lib64/python3.8/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/venv/lib64/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/venv/lib64/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/venv/lib64/python3.8/site-packages/tcms/core/management/commands/initial_setup.py", line 11, in handle
call_command("migrate", "--verbosity=%i" % kwargs["verbosity"])
File "/venv/lib64/python3.8/site-packages/django/core/management/init.py", line 181, in call_command
return command.execute(*args, **defaults)
File "/venv/lib64/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/venv/lib64/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/django/core/management/commands/migrate.py", line 92, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/venv/lib64/python3.8/site-packages/django/db/migrations/executor.py", line 18, in init
self.loader = MigrationLoader(self.connection)
File "/venv/lib64/python3.8/site-packages/django/db/migrations/loader.py", line 53, in init
self.build_graph()
File "/venv/lib64/python3.8/site-packages/django/db/migrations/loader.py", line 220, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/venv/lib64/python3.8/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
if self.has_table():
File "/venv/lib64/python3.8/site-packages/django/db/migrations/recorder.py", line 55, in has_table
with self.connection.cursor() as cursor:
File "/venv/lib64/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 259, in cursor
return self._cursor()
File "/venv/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 235, in _cursor
self.ensure_connection()
File "/venv/lib64/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/venv/lib64/python3.8/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/venv/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/venv/lib64/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/venv/lib64/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/django/db/backends/mysql/base.py", line 234, in get_new_connection
connection = Database.connect(**conn_params)
File "/venv/lib64/python3.8/site-packages/MySQLdb/init.py", line 130, in Connect
return Connection(*args, **kwargs)
File "/venv/lib64/python3.8/site-packages/MySQLdb/connections.py", line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (2005, "Unknown MySQL server host 'db' (-2)")
I'm working windows 10. I also have the kiwi_db that is constantly restarted in docker
Unknown MySQL server host 'db' (-2)"
The error message itself is clear enough. Your DB server doesn't seem to be up and running.
I'm working windows 10. I also have the kiwi_db that is constantly restarted in docker
Kiwi TCMS and MySQL/MariaDB are Linux based containers so maybe your Windows host is not capable of running Linux containers in the first place. Refer to Docker's documentation/support on that matter.
This may be of help but fair warning that it's been written by a 3rd party not affiliated with the Kiwi TCMS team:
https://medium.com/#siriwardhane.yuwin/running-kiwi-tcms-as-a-docker-container-in-windows-10-home-82d74b107202

How can I fix Flask in local appengine env giving 404/500 error

I'm running into a 404 error (in the console) and 500 error (in the browser) when I'm simply trying to run this AppEngine tutorial
https://cloud.google.com/appengine/docs/standard/python/getting-started/python-standard-env
I followed the whole tutorial, copying the latest files from github, and am trying to run it in the local env.
dev_appserver.py --port=8080 --enable_console=yes app.yaml
When I try to browse to http://localhost:8080
In the console, I get
HTTPError()
HTTPError()
Traceback (most recent call last):
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 1302, in communicate
req.respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\wsgi_server.py", line 292, in __call__
return app(environ, start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\request_rewriter.py", line 314, in _rewriter_m
iddleware
response_body = iter(application(environ, wrapped_start_response))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 165,
in __call__
self._flush_logs(response.get('logs', []))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 308,
in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 97, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 331, in MakeSyncCall
rpc.CheckSuccess()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 136, in CheckSuccess
self._traceback)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 161, in _WaitImpl
self.request, self.response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 223, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 248, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 485, in Send
self._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 631, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 369, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 308, in _GetAuthToken
response = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
INFO 2019-04-18 09:56:39,905 module.py:861] default: "GET /form HTTP/1.1" 50
0 -
Traceback (most recent call last):
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 1302, in communicate
req.respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\wsgi_server.py", line 292, in __call__
return app(environ, start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\request_rewriter.py", line 314, in _rewriter_m
iddleware
response_body = iter(application(environ, wrapped_start_response))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 165,
in __call__
self._flush_logs(response.get('logs', []))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 308,
in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 97, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 331, in MakeSyncCall
rpc.CheckSuccess()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 136, in CheckSuccess
self._traceback)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 161, in _WaitImpl
self.request, self.response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 223, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 248, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 485, in Send
self._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 631, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 369, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 308, in _GetAuthToken
response = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
In the browser, I get
localhost is currently unable to handle this request.
HTTP ERROR 500
I've found some posts with similar symptoms, but not exact. And none of the solutions suggested fix the issue.
Tried:
- Specifying the port 8080 in the dev_appserver.
- Ensuring ASP.NET framework was installed.
- Turning on IIS.
- Ensuring SDK is latest version.
This is also just straight from Google's tutorial.
Anybody have any insight/ideas?
HTTPError: HTTP Error 404: Not Found INFO 2019-04-18 09:56:39,905
module.py:861] default: "GET /form HTTP/1.1" 500
this line jumps out. Are you sure you followed step 2 here and step 4 here?
If you are, can you run the command below in the project directory and provide the output? (Don't forget to remove PII/SPI)
dir . /s /b sortorder:N

Django 1.11 - python 3.4 // not able to createsuperuser

**(geoenv) C:\Users\Nitish\Desktop\Mtech Project\Stage 8 database start\geosite>python manage.py createsuperuser
You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
Traceback (most recent call last):
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: auth_user
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management__init__.py", line 363, in execute_from_command_line
utility.execute()
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management\base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 63, in execute
return super(Command, self).execute(*args, **options)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management\base.py", line 330, in execute
output = self.handle(*args, **options)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 96, in handle
default_username = get_default_username()
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\contrib\auth\management__init__.py", line 148, in get_default_username
auth_app.User._default_manager.get(username=default_username)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 374, in get
num = len(clone)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 232, in len
self._fetch_all()
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 1105, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 53, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\sql\compiler.py", line 886, in execute_sql
raise original_exception
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\sql\compiler.py", line 876, in execute_sql
cursor.execute(sql, params)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 80, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\utils.py", line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\utils\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 65, in execute
return self.cursor.execute(sql, params)
File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: auth_user
createsuperuser
cmd can only be used after making models and makemigrations and migrate cmd.
I was trying to use it before that.

error FileNotOpenedError

I obtain a error when try to write a file in cloud storage
my code:
my_file = files.gs.create('/gs/foo/myfile')
with files.open(my_file, 'a') as f:
f.write('Hello World!')
f.write('Hello World Again!')
Traceback (most recent call last):
File "C:\Datos\proyectos\dropbox\Proyectos\as3\semtable\remote_api\using_datastore.py", line 63, in <module>
f.write('Hello World Again!')
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 281, in __exit__
self.close()
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 275, in close
self._make_rpc_call_with_retry('Close', request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 388, in _make_rpc_call_with_retry
_make_call(method, request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 236, in _make_call
_raise_app_error(e)
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 179, in _raise_app_error
raise FileNotOpenedError()
google.appengine.api.files.file.FileNotOpenedError

Resources