Cant't deploy after update new version parseconsole.exe - deployment

today I've updated my parseconsole.exe and I can't deploy my code when yesterday I could.
I've try to do another develop but the same error happens, this is the trace:
> parse new WebContent
Creating directory C:\Users\NOTEBOOK\Documents\docs\Parse\Works_pars
e_luna\Prueba_node\WebContent\config
Creating config file C:\Users\NOTEBOOK\Documents\docs\Parse\Works_pa
rse_luna\Prueba_node\WebContent\config\global.json
Creating directory C:\Users\NOTEBOOK\Documents\docs\Parse\Works_pars
e_luna\Prueba_node\WebContent\cloud
Writing out sample file C:\Users\NOTEBOOK\Documents\docs\Parse\Works
_parse_luna\Prueba_node\WebContent\cloud\main.js
Creating directory C:\Users\NOTEBOOK\Documents\docs\Parse\Works_pars
e_luna\Prueba_node\WebContent\public
Writing out sample file C:\Users\NOTEBOOK\Documents\docs\Parse\Works
_parse_luna\Prueba_node\WebContent\public\index.html
Email: xxxxxx
Password:
1: prueba
2: prueba_cloud
Select an App: 2
PS C:\Users\NOTEBOOK\Documents\docs\Parse\Works_parse_luna\Prueba_no
de> cd WebContent
PS C:\Users\NOTEBOOK\Documents\docs\Parse\Works_parse_luna\Prueba_no
de\WebContent> parse deploy
Uploading source files
Traceback (most recent call last):
File "<string>", line 6, in <module>
File ".\build\pyi.win32\parse\out00-PYZ.pyz\main", line 695, in main
File ".\build\pyi.win32\parse\out00-PYZ.pyz\main", line 206, in handle_deploy
File ".\build\pyi.win32\parse\out00-PYZ.pyz\parse", line 332, in deploy
File ".\build\pyi.win32\parse\out00-PYZ.pyz\parse", line 231, in upload_source
_files
File ".\build\pyi.win32\parse\out00-PYZ.pyz\parse", line 39, in post
File ".\build\pyi.win32\parse\out00-PYZ.pyz\urllib2", line 126, in urlopen
File ".\build\pyi.win32\parse\out00-PYZ.pyz\urllib2", line 391, in open
File ".\build\pyi.win32\parse\out00-PYZ.pyz\urllib2", line 409, in _open
File ".\build\pyi.win32\parse\out00-PYZ.pyz\urllib2", line 369, in _call_chain
File ".\build\pyi.win32\parse\out00-PYZ.pyz\urllib2", line 1178, in https_open
File ".\build\pyi.win32\parse\out00-PYZ.pyz\urllib2", line 1142, in do_open
File ".\build\pyi.win32\parse\out00-PYZ.pyz\httplib", line 914, in request
File ".\build\pyi.win32\parse\out00-PYZ.pyz\httplib", line 954, in _send_request
File ".\build\pyi.win32\parse\out00-PYZ.pyz\httplib", line 759, in send
File ".\build\pyi.win32\parse\out00-PYZ.pyz\ssl", line 203, in sendall
File ".\build\pyi.win32\parse\out00-PYZ.pyz\ssl", line 174, in send
TypeError: write() argument 1 must be string or read-only buffer, not bytearray
thaks for your help

After reading https://stackoverflow.com/a/26982677/2211980, it seems that Parse has released a new version. I've just downloaded it from: https://www.parse.com/downloads/windows/console/parse.zip.
There is a deprecated warning but after seeing exactly the same errors as yours yesterday, I can now deploy, thankfully.

I know this thread is old but it may help newcomers in the future,
Parse announed that they made a change that require everyone to manually download the newest version of their CLI as of today (7.2.2015) the current version is 2.1.2 you can download it directly from the Parse.com
or if you like I made a repo containing the files for it, CLI Repo
Hope it helps.

Now there is a new version that is working.
Parse CLI v3.0.2
https://github.com/ParsePlatform/parse-cli/releases/

Related

AttributeError: 'AuthorizedSession' object has no attribute 'configure_mtls_channel'

I was orchestrating two dataflow job with cloud composer and it was working fine for month. Suddenly the two jobs stopped working with the following error message:
in download_blob File
"/usr/local/lib/python3.6/site-packages/google/cloud/storage/client.py",
line 399, in get_bucket retry=retry, File
"/usr/local/lib/python3.6/site-packages/google/cloud/storage/bucket.py",
line 1002, in reload retry=retry, File
"/usr/local/lib/python3.6/site-packages/google/cloud/storage/_helpers.py",
line 225, in reload retry=retry, File
"/usr/local/lib/python3.6/site-packages/google/cloud/storage/_http.py",
line 63, in api_request return call() File
"/usr/local/lib/python3.6/site-packages/google/api_core/retry.py",
line 286, in retry_wrapped_func on_error=on_error, File
"/usr/local/lib/python3.6/site-packages/google/api_core/retry.py",
line 184, in retry_target return target() File
"/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line
479, in api_request timeout=timeout, File
"/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line
337, in _make_request method, url, headers, data, target_object,
timeout=timeout File
"/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line
374, in _do_request return self.http.request( File
"/usr/local/lib/python3.6/site-packages/google/cloud/_http.py", line
157, in http return self._client._http File
"/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line
187, in _http
self._http_internal.configure_mtls_channel(self._client_cert_source)
AttributeError: 'AuthorizedSession' object has no attribute
'configure_mtls_channel'
In the jobs I download a file from google cloud storage with the storage client. I assumed it was because of some dependencies issues. In the composer environment I installed google-cloud-storage without specifying a version. I tried specifying different versions of the package but nothing seems to work.
Thanks!
This seems to be related to this issue.
Try pinning google-cloud-core to 1.5.0, then I highly recommend for you to Drain your jobs once you get them back to work (assuming they have streaming jobs).

How to package locust file with pyinstaller

In virtual environment I installed locust.
I want to create distributable package so any user can run load tests.
I used pyinstaller.
The exe file is created but when I run it nothing happens.
from locust import HttpUser, TaskSet, task
import orjson as json
def create_post(self):
paramsDict = {}
paramsDict = json.loads('{ ...myjson.. }')
params = json.dumps(paramsDict) #for orjson
headers = {'content-type': 'application/json','Accept-Encoding':'gzip'}
response = self.client.post("/",data= params, headers=headers, name = "Post query")
print(f'response -> {response}')
class WebsiteUser(HttpUser):
tasks = [create_post]
I used locust as library as Axel pointed.
I build with pyinstaller and tests runs just web page is not displayed
I build with pyinstaller but web did not appear `response -> <Response [200]>
Traceback (most recent call last):
File "gevent\pywsgi.py", line 999, in handle_one_response
File "gevent\pywsgi.py", line 945, in run_application
File "flask\app.py", line 2464, in __call__
File "flask\app.py", line 2450, in wsgi_app
File "flask\app.py", line 1867, in handle_exception
File "flask\_compat.py", line 39, in reraise
File "flask\app.py", line 2447, in wsgi_app
File "flask\app.py", line 1952, in full_dispatch_request
File "flask\app.py", line 1821, in handle_user_exception
File "flask\_compat.py", line 39, in reraise
File "flask\app.py", line 1950, in full_dispatch_request
File "flask\app.py", line 1936, in dispatch_request
File "locust\web.py", line 419, in wrapper
File "locust\web.py", line 132, in index
File "flask\templating.py", line 138, in render_template
File "jinja2\environment.py", line 930, in get_or_select_template
File "jinja2\environment.py", line 883, in get_template
File "jinja2\environment.py", line 857, in _load_template
File "jinja2\loaders.py", line 115, in load
File "flask\templating.py", line 60, in get_source
File "flask\templating.py", line 89, in _get_source_fast
jinja2.exceptions.TemplateNotFound: index.html
2021-01-11T11:29:52Z {'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '61083', 'HTTP_HOST': 'localhost:8089', (hidden keys: 31)} failed with TemplateNot
The template needs to be included in build.
Into spec file I added into data section as well as static with java scripts and css
datas=[('<path>\\Lib\\site-packages\\locust\\templates', 'locust\\templates'),('<path>\\Lib\\site-packages\\locust\\static', 'locust\\static')],
With Inno Setup I added also those to folders to be in same folder as executable.
And web page is displayed.
All depend on how are you expecting to get your test executed and what are your really packing. Locust have different ways of use. Assuming that you wanna pack your test file as an executable file you may need to include in your file a main entrypoint that use locust as a library
If you are packing the locust itself and the virtualenv including your test file you may need to specify how to run locust as a command and pass your test file as a command line argument

Librabbitmq 2.0.0 with Python 3 gives TypeError: can't pickle memoryview objects

I am using the latest master branch of the git repo https://github.com/celery/librabbitmq and installing librabbitmq==2.0.0 for Python 3.6 by following the instructions in the readme
Using the development version
You can clone the repository by doing the following:
$ git clone git://github.com/celery/librabbitmq.git
Then install it by doing the following:
$ cd librabbitmq
$ make install # or make develop
This works fine (after installing certain binaries for c compliation in the OS), but when I then make a small a+b add task and call it with add.delay(2,2) it fails with the following error. I looked up and saw that Celery 4 uses json as serializer, so clearly it is not because if pickle serialization
Changing from librabbitmq to pyamqp broker works normally
Same exact situation in both MacOS and Ubuntu 16
[2018-04-30 23:40:02,956: CRITICAL/MainProcess] Unrecoverable error:
SystemError(' returned a result with an error set',) Traceback (most
recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/messaging.py",
line 624, in _receive_callback
return on_m(message) if on_m else self.receive(decoded, message) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 570, in on_task_received
callbacks, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/strategy.py",
line 145, in task_message_handler
handle(req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 221, in _process_task_sem
return self._quick_acquire(self._process_task, req) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/semaphore.py",
line 62, in acquire
callback(*partial_args, **partial_kwargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 226, in _process_task
req.execute_using_pool(self.pool) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/request.py",
line 531, in execute_using_pool
correlation_id=task_id, File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/base.py",
line 155, in apply_async
**options) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/billiard/pool.py",
line 1486, in apply_async
self._quick_put((TASK, (result._job, None, func, args, kwds))) File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/concurrency/asynpool.py",
line 813, in send_job
body = dumps(tup, protocol=protocol) TypeError: can't pickle memoryview objects
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File
"/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/worker.py",
line 203, in start
self.blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 370, in start
return self.obj.start() File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 320, in start
blueprint.start(self) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/bootsteps.py",
line 119, in start
step.start(parent) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/consumer/consumer.py",
line 596, in start
c.loop(*c.loop_args()) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/celery/worker/loops.py",
line 88, in asynloop
next(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/async/hub.py",
line 354, in create_loop
cb(*cbargs) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 236, in on_readable
reader(loop) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/kombu/transport/base.py",
line 218, in _read
drain_events(timeout=0) File "/Users/somghosh/.virtualenvs/ctdb/lib/python3.6/site-packages/librabbitmq-2.0.0-py3.6-macosx-10.6-intel.egg/librabbitmq/init.py",
line 227, in drain_events
self._basic_recv(timeout) SystemError: returned a result with an error set
This library is not recommended to use as rabbitmq broker with celery. Instead please try py-amqp. this is more maintained and less buggy.

sublime text 2 phpcs plugin python error

I am using Sublime Text 2 with some plugins. I can't seem to work with the Phpcs plugin, because after saving the file, it gives me an ugly error:
Writing file /Applications/XAMPP/xamppfiles/htdocs/myProject/application/libraries/Authentication.php with encoding UTF-8
Exception in thread Thread-15:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "./phpcs.py", line 398, in run
File "./phpcs.py", line 128, in get_errors
File "./phpcs.py", line 194, in execute
File "./phpcs.py", line 197, in parse_report
File "./phpcs.py", line 149, in shell_out
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I have also tried to look into the respective files, but I don't know python at all so I don;t know what to do :-/
Could You please help ?
I ended up using SublimeLinter plugin that provides the showing-potential-errors feature that I wanted from the phpcs plugin.
The plugin is located in THIS GITHUB REPO.
Hope this helps anybody who is having a problem using the phpcs library.
#daniel: Thanks for help

Move a Pinax project

(Cross post from Pinax Users Google group -- I figured it would be useful to have this question on here as well.)
I'm a bit stuck. My projects work fine when I run them on the original machine I create them on, but I get an error when I move them to another machine. I'm trying to use hosted version control to manage a project between two computers, but it only works on the machine I create it on. I'm just trying to get the project base "zero" to run on both machines. Here's the console output I'm getting when I run manage.py runserver:
Traceback (most recent call last):
File "manage.py", line 27, in <module>
execute_from_command_line()
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/core/management/__init__.py", line 352, in execute_from_command_line
utility.execute()
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/core/management/__init__.py", line 306, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/core/management/base.py", line 192, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/core/management/base.py", line 210, in execute
translation.activate('en-us')
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 73, in activate
return real_activate(language)
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/utils/translation/__init__.py", line 43, in delayed_loader
return g['real_%s' % caller](*args, **kwargs)
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 209, in activate
_active[currentThread()] = translation(language)
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 198, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/home/loren/pinax-env/lib/python2.6/site-packages/django/utils/translation/trans_real.py", line 181, in _fetch
app = getattr(__import__(appname[:p], {}, {}, [appname[p+1:]]), appname[p+1:])
AttributeError: 'module' object has no attribute 'messages'
I expect that this has something to do with my pythonpath, but I'm just too new to this to know where to look. I dug up this thread, but I couldn't find a solution in it:
Django failing to find apps
Help would be great!