What am I doing wrong? I am sure its just a simpile sytanx error.
Help is appreciated
db.venues.truncate("RESTARTIDENTITYCASCADE")
It looks like your command is all globed together without spaces. This link shows the command as:
db.venues.truncate('RESTART IDENTITY CASCADE')
Related
I tried to run the code
pcp.get_compounds('CC', searchtype='superstructure', listkey_count=3)
but, it didn't work.
This code is exactly the same as one shown in the documentation ("https://pubchempy.readthedocs.io/en/latest/guide/searching.html#advanced-search-types").
Another code such as pcp.get_compounds('Aspirin', 'name', record_type='3d') which is shown in the same page worked.
Please give me some advice about how to fix this error.
It appears that the example in the PubChemPy advanced search documentation is missing a parameter. The example does not identify how to search, i.e., by SMILES. Substituting the following statement for the one in the example should give you the desired result.
pcp.get_compounds('CC', 'smiles', searchtype='superstructure', listkey_count=3)
I have not used vscode for a while, and when i opened it last night. It won't let me change any setting because the error in the json setting. I tried to fix it but i failed.
Thank you for some people helping me to fix the first part of the code. But i still have the error for the second part. Tried to remove and add the {}, but it does not help.
you don't have valid json.
delete the code runner line or add a value to it with a comma at the end
something got borked up on your settings file
valid json is like this
{
"key": value,
}
looks like te json is not well formatted. For every array you should have key:value, but on your screenshot seems like you wrote key:key:value.
In the setting file "settings.json", we need to pay attention to: 1. Please use "," to separate the settings; 2. As people say, we need to write the settings completely. (For settings that are not used, we can comment them out.)
Before:
After:
win32wnet.WNetCancelConnection2("",0,0)
What exactly I have to pass as the first parameter here ?
network path ?? eg:- "\\192.168.7.177"
machine_name
or something else .
Thanking everybody in advance.
You were right regarding the network path. It should look something like this:
win32wnet.WNetCancelConnection2('\\\\127.0.0.1\\c$',0,0)
You can find out more here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa385427(v=vs.85).aspx
Don't forget about the escape character!
I'm running into an issue with the peewee regexp function. Queries like this work the first time I run it:
query = Table.select().where(Table.column.regexp('string'))
However, if I try to run it with a different string, I get this error: 'unicode' object has no attribute 'regexp':
query = Table.select().where(Table.column.regexp('string2'))
I usually run it twice because I need to see how specific to make the regexp string.
I've tried disconnecting/reconnecting to the db, but that doesn't help. The only thing that works is if I close ipython and restart it. Is this a memory/buffer issue? Is there a good way to get this to work? Thanks in advance.
I am facing a very simple problem on changing the backref text in python footnote. I read the doc of footnote at here . The site clearly says BACKLINK_TEXT could be overwritten to allow other character.
So I tried following code:
import markdown.extensions.footnotes
import markdown
markdown.markdown(some_text,extensions=['footnotes'], BACKLINK_TEXT ="Δ")
The above code doesn't produce the Backref text specified as ← but gave the default value as ↩ .
Is above code the correct way of initializing the config for footnote?
After reading documentation about extensions I think you need
extensions=['footnotes(BACKLINK_TEXT=Δ)']
because BACKLINK_TEXT is option for footnotes extension.
See: Markdown#extensions
I figured out the problem, there is error in footnotes.py code of python-markdown. They have used
for key,val in configs:
instead of:
for key,val in configs.iteritems().
This was the problem. Hope they fix this in another version.