Exporting trained instrument in DDSP-VST - vst

I bought the pro colab+ and uploaded my own instrument to google drive and I initiated the training module and after 30 mins it is finished but gives me an error saying that the instrument is not found.
this is the error code :
Exporting model...
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 165, in get_latest_operative_config
restore_dir, prefix='operative_config-', suffix='.gin')
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 106, in get_latest_file
f'No files found matching the pattern '{search_pattern}'.')
FileNotFoundError: No files found matching the pattern '/content/gdrive/MyDrive/My/operative_config-*.gin'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/ddsp_export", line 8, in
sys.exit(console_entry_point())
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/ddsp_export.py", line 364, in console_entry_point
app.run(main)
File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/ddsp_export.py", line 333, in main
export_impulse_response(model_path, save_dir, FLAGS.reverb_sample_rate)
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/ddsp_export.py", line 272, in export_impulse_response
ddsp.training.inference.parse_operative_config(model_path)
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/inference.py", line 41, in parse_operative_config
operative_config = train_util.get_latest_operative_config(ckpt_dir)
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 168, in get_latest_operative_config
os.path.dirname(restore_dir), prefix='operative_config-', suffix='.gin')
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 106, in get_latest_file
f'No files found matching the pattern '{search_pattern}'.')
FileNotFoundError: No files found matching the pattern '/content/gdrive/MyDrive/operative_config-*.gin'.
Export complete! Zipping /content/gdrive/MyDrive/My Instrument/ddsp-training-2022-07-18-0955/My_Instrument to /content/gdrive/MyDrive/My Instrument/ddsp-training-2022-07-18-0955/My_Instrument.zip
/bin/bash: line 0: cd: too many arguments
Zipping Complete! Downloading... My_Instrument.zip
You can also find your model at /content/gdrive/MyDrive/My Instrument/ddsp-training-2022-07-18-0955/My_Instrument
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/ipyfilechooser/filechooser.py in _on_select_click(self, _b)
315 if self._callback is not None:
316 try:
--> 317 self._callback(self)
318 except TypeError:
319 # Support previous behaviour of not passing self
3 frames
/usr/local/lib/python3.7/dist-packages/google/colab/files.py in download(filename)
187 raise OSError(msg)
188 else:
--> 189 raise FileNotFoundError(msg) # pylint: disable=undefined-variable
190
191 comm_manager = _IPython.get_ipython().kernel.comm_manager
FileNotFoundError: Cannot find file: /content/gdrive/MyDrive/My Instrument/ddsp-training-2022-07-18-0955/My_Instrument.zip

Related

SQLFluff Lint not working for multilevel subdirectory sql file

we are trying to use SQLFluff in our project to avoid sql parser errors before deployment.
in our case we have subdirectories which contains sql files.
During Development we are running command sqlfluff lint command in root directory, we found that lint command is working for one level subdirectory sql path like below,
sqlfluff lint demo/complexquery.sql --dialect snowflake
But when we try for 2 level subdirectory sql file path, lint command is not working and giving error as below. could you please let me know whether iam missing syntax.
sqlfluff lint SQLScript/demo/complexquery.sql --dialect snowflake
Traceback (most recent call last):
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\toml\decoder.py", line 395, in loads
value, vtype = decoder.load_value(multilinestr)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\toml\decoder.py", line 849, in load_value
raise ValueError("Found tokens after a closed " +
ValueError: Found tokens after a closed string. Invalid TOML.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\ar\AppData\Roaming\Python\Python310\Scripts\sqlfluff.exe_main.py", line 7, in
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\cli\commands.py", line 549, in lint
config = get_config(
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\cli\commands.py", line 361, in get_config
return FluffConfig.from_root(
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\core\config.py", line 613, in from_root
c = loader.load_config_up_to_path(
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\core\config.py", line 414, in load_config_up_to_path
[self.load_config_at_path(p) for p in config_paths]
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\core\config.py", line 414, in
[self.load_config_at_path(p) for p in config_paths]
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\core\config.py", line 338, in load_config_at_path
configs = self.load_config_file(p, fname, configs=configs)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\core\config.py", line 305, in load_config_file
elems = self._get_config_elems_from_toml(file_path)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\sqlfluff\core\config.py", line 191, in _get_config_elems_from_toml
config = toml.load(fpath)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\toml\decoder.py", line 134, in load
return loads(ffile.read(), _dict, decoder)
File "C:\Users\ar\AppData\Roaming\Python\Python310\site-packages\toml\decoder.py", line 397, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Found tokens after a closed string. Invalid TOML. (line 54 column 1 char 4192)

Error while executing basic code in Locust

from locust import Locust, TaskSet
def login(l):
print("I am logged In")
def logout(m):
print("I am logged Out")
class UserBehaviour(TaskSet):
task=[login,logout]
class User(Locust):
task_set = UserBehaviour
Error Message---
(venv) C:\pythnprojects\LearnLocustProject\venv\locust_test>locust -f firstlocust.py
[2020-03-11 00:38:57,259] DELLXPS/INFO/locust.main: Starting web monitor at *:8089
[2020-03-11 00:38:57,259] DELLXPS/INFO/locust.main: Starting Locust 0.11.0
[2020-03-11 00:39:05,581] DELLXPS/INFO/locust.runners: Hatching and swarming 1 clients at the rate 1 clients/s...
[2020-03-11 00:39:05,585] DELLXPS/ERROR/stderr: Traceback (most recent call last):
File "c:\pythnprojects\learnlocustproject\venv\lib\site-packages\locust\core.py", line 358, in run
self.schedule_task(self.get_next_task())
File "c:\pythnprojects\learnlocustproject\venv\lib\site-packages\locust\core.py", line 419, in get_next_task
return random.choice(self.tasks)
File "C:\DOWNLOADS\lib\random.py", line 290, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
[2020-03-11 00:39:06,582] DELLXPS/INFO/locust.runners: All locusts hatched: User: 1
[2020-03-11 00:39:06,591] DELLXPS/ERROR/stderr: Traceback (most recent call last):
File "c:\pythnprojects\learnlocustproject\venv\lib\site-packages\locust\core.py", line 358, in run
self.schedule_task(self.get_next_task())
File "c:\pythnprojects\learnlocustproject\venv\lib\site-packages\locust\core.py", line 419, in get_next_task
return random.choice(self.tasks)
File "C:\DOWNLOADS\lib\random.py", line 290, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
[2020-03-11 00:39:07,597] DELLXPS/ERROR/stderr: Traceback (most recent call last):
File "c:\pythnprojects\learnlocustproject\venv\lib\site-packages\locust\core.py", line 358, in run
self.schedule_task(self.get_next_task())
File "c:\pythnprojects\learnlocustproject\venv\lib\site-packages\locust\core.py", line 419, in get_next_task
return random.choice(self.tasks)
File "C:\DOWNLOADS\lib\random.py", line 290, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
It looks like you've misspelled tasks (it currently seems to say task).

Is there any example of how to use the digital input or analog input of GPIO on google aiy voice board?

I can not read the input from the motion sensor (HC-SR501) which connects to PIN_A of the expansion pins on the voice bonnet of my aiy voice kit.
Below are the code and the error message, please shed some light.
Code:
from gpiozero import MotionSensor
from aiy.pins import (PIN_A, PIN_B, PIN_C, PIN_D)
pir = MotionSensor(PIN_A)
pir.wait_for_motion()
print("Motion detected!")
Error message:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 51, in __init__
self.pin.pull = pull
File "/usr/lib/python3/dist-packages/gpiozero/pins/__init__.py", line 279, in <lambda>
lambda self, value: self._set_pull(value),
File "/opt/aiy/projects-python/src/aiy/pins.py", line 569, in _set_pull
'Only pull up is supported right now (%s)' % pull)
gpiozero.exc.PinFixedPull: Only pull up is supported right now (down)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "motion_sensor.py", line 4, in <module>
pir = MotionSensor(PIN_A)
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 95, in __call__
self = super(GPIOMeta, cls).__call__(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 451, in __init__
pin_factory=pin_factory
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 163, in __init__
pin, pull_up, pin_factory=pin_factory
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 164, in __init__
super(EventsMixin, self).__init__(*args, **kwargs)
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 53, in __init__
self.close()
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 185, in close
super(SmoothedInputDevice, self).close()
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 393, in close
self.pin_factory.release_pins(self, self._pin.number)
AttributeError: 'HatPin' object has no attribute 'number'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 483, in _shutdown
_devices_shutdown()
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 476, in _devices_shutdown
dev.close()
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 185, in close
super(SmoothedInputDevice, self).close()
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 393, in close
self.pin_factory.release_pins(self, self._pin.number)
AttributeError: 'HatPin' object has no attribute 'number'
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 122, in __del__
self.close()
File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 185, in close
super(SmoothedInputDevice, self).close()
File "/usr/lib/python3/dist-packages/gpiozero/devices.py", line 393, in close
self.pin_factory.release_pins(self, self._pin.number)
AttributeError: 'HatPin' object has no attribute 'number'
Did you solve it?
By looking at the API and your error message, try changing line 3 of your code
From:
pir = MotionSensor(PIN_A)
To:
pir = MotionSensor(PIN_A, pull_up=True)

KeyError: 'found' on Elastic2DocManager when syncing data from MongoDB

From MongoDB to Elastic Search(5.6.5), I sync the database with Mongo-Connector using Elastic2DocManager:
mongo-connector -m localhost:27017 -t localhost:9200 -d elastic2_doc_manager
After seeing some update on docs.deleted of mongodb_meta on Elastic Search:
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
yellow open mongodb_meta 3wd6OjTT6tD3f6ZGezZw 5 1 1337173 8372 192.9mb 192.9mb
mongo-connector stops working with below error:
2018-07-11 07:16:41,977 [WARNING] elasticsearch:97 - POST http://localhost:9200/_bulk [status:N/A request:10.003s]
Traceback (most recent call last):
File "c:\programdata\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "c:\programdata\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "c:\programdata\anaconda3\lib\http\client.py", line 1331, in getresponse
response.begin()
File "c:\programdata\anaconda3\lib\http\client.py", line 297, in begin
version, status, reason = self._read_status()
File "c:\programdata\anaconda3\lib\http\client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "c:\programdata\anaconda3\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
...
Exception in thread Thread-1:
Traceback (most recent call last):
File "c:\programdata\anaconda3\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 150, in run
self._docman.send_buffered_operations()
File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 482, in send_buffered_operations
action_buffer = self.BulkBuffer.get_buffer()
File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 696, in get_buffer
self.update_sources()
File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\util.py", line 35, in wrapped
return f(*args, **kwargs)
File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 628, in update_sources
if ES_doc['found']:
KeyError: 'found'
What is the reason for this error?
Make sure the versions are compatible.
The required python packages are installed, this is my requirements.txt look like.
astroid==1.6.5
autopep8==1.3.5
certifi==2018.8.24
elasticsearch==6.3.1
elasticsearch-dsl==6.2.1
isort==4.3.4
lazy-object-proxy==1.3.1
mccabe==0.6.1
pycodestyle==2.4.0
pylint==1.9.2
pymongo==3.7.1
rope==0.11.0
six==1.11.0
urllib3==1.23
wrapt==1.10.11

ipython: OperationalError: disk I/O error

I was running ipython successfully on fedora 18 until now: I'm getting the following exception when trying to launch it:
Traceback (most recent call last):
File "/usr/bin/ipython", line 9, in <module>
load_entry_point('ipython==1.1.0', 'console_scripts', 'ipython')()
File "/usr/lib/python2.7/site-packages/IPython/__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/config/application.py", line 544, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/usr/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 323, in initialize
self.init_shell()
File "/usr/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 339, in init_shell
ipython_dir=self.ipython_dir, user_ns=self.user_ns)
File "/usr/lib/python2.7/site-packages/IPython/config/configurable.py", line 349, in instance
inst = cls(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 320, in __init__
**kwargs
File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 456, in __init__
self.init_history()
File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 1487, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "/usr/lib/python2.7/site-packages/IPython/core/history.py", line 481, in __init__
self.new_session()
File "<string>", line 2, in new_session
File "/usr/lib/python2.7/site-packages/IPython/core/history.py", line 65, in needs_sqlite
return f(self, *a, **kw)
File "/usr/lib/python2.7/site-packages/IPython/core/history.py", line 500, in new_session
self.session_number = cur.lastrowid
OperationalError: disk I/O error
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev#scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
c.Application.verbose_crash=True
I tried to upgrade ipython to the latest version using pip, which did not help. Any solution or workaround is very much welcomed.
IPython store history in a profile generally in ~/.ipython/profile_default/history.sqlite. There seem to be a disk error reading/writting to it.
Check the permissions of the file/folders, if necessary delete the file.
I solved it by set c.NotebookNotary.db_file = u':memory:' in jupyter configure file ~/.jupyter/jupyter_notebook_config.py