I want to add a csv-layer by PyQGIS in a standalone script. This is my code: uri = 'file:///C:/Users/sml/Desktop/point.csv?delimiter=,&amp;crs=epsg:4326&amp;xField=x&amp;yField=y' vlayer = QgsVectorLayer(uri, &quot;point&quot;, &quot;delimitedtext&quot;) print(vlayer.isValid()) QgsProject.instance().addMapLayer(vlayer)  The same code works fine in the QGIS Python console, but it can't work in a standalone script. I don't know why.
I am having trouble loading csv files into layers using QgsVectorLayer().  I know this looks like a repeat, but I have carefully read     and    but still cannot get it work.  An example of my data file, test.csv:  Index,y,x 0,37.7646618,-122.4960858 1,37.777494,-122.416311 2,37.717707,-122.3997056 3,37.732284,-122.498118 4,37.749998,-122.392333   My code:  import os import urllib  import pathlib from qgis.core import QgsVectorLayer  local_path = 'C:\dev\FCMS_conflation\data\TMC_nodes.csv' node_layer = 'test'  abspath = os.path.abspath(local_path) params = {'delimiter': ',',           'decimalPoint': '.',           'xField': longitude,           'yField': latitude}  uri = "%s?%s" %(pathlib.Path(abspath).as_uri(), urllib.unquote(urllib.urlencode(params)))  layer = QgsVectorLayer(uri, node_layer, "delimitedtext")   The formatted URI looks like:  [] uri &gt;&gt;&gt; 'file:///C:/dev/FCMS_conflation/data/TMC_nodes.csv?decimalPoint=.&amp;delimiter=,&amp;xField=longitude&amp;yField=latitude'   I have tried many variations of the parameters, including the crs and type. But no matter what I try, I cannot create a valid layer.  [] layer.isValid() &gt;&gt;&gt; False   I have verified that I can add the file using the QGIS gui. I even tried using the uri provided by layer.metadata from within the Python plugin.   I am using QGIS 2.10.1 on Windows 7 64-bit machine.
Is it possible to scale specific apps on Windows 10? “He is small enough to walk.” But baby wasn't walking so why didn't they use “small” instead of “small enough”? Is "forte" pronounced "fort" or "for-tay"? I've always heard people say something like     "Pronunciation is not my [for-tay]"   ... but I feel that I've heard that the correct pronunciation is     "Confusing people is my [fort]"   What is the proper way to pronounce this word? Typesetting 144...4 with "n times" under the 4's is easy, but what about \sqrt{144...4}? Inspired by  on the math StackExchange, suppose you want to typeset the square root of the number 144...4, that is, 1 followed by n 4's. If you write $\sqrt{1\underbrace{44\ldots4}_{n\ \text{times}}}$, as in the current version of the question, you get a huge radical sign that reaches down to match the "n times" text below the number. Is there an elegant way to typeset this so that the radical sign looks like it would with $\sqrt{144\ldots4}$, but also keeping the underset text in the right place? How can I get maximum DoF with no distance markers? I am aware of what hyperfocal distance is and the general principles behind it. However, most of the tutorials I have seen and read regarding it make use of lenses with focus distance indicators. Unfortunately, neither of my lenses (Nikkor 18-55mm &amp; 35mm f1.8) have indicators.  I have read that you can 'cheat' and simply focus a third of the way into the shot (which I have done previously simply by spot-focusing on the lowest focus point in my VF). I also assume you could pace out the distance and note an object to focus on when you get back to the camera (though that might be easier said than done).  Does anyone have any suggestions on how to achieve maximum sharpness from front to back without focus distance markers. A new lens is not an option; global economic crisis and all that! Working with objects created with Activator.CreateInstance How can I reset my menus? Suppose a vibrating fork exerts force to the air particles to compress which leads to the increase of internal energy (heat).This heat or energy given by the fork is given to the next layer of air and in this way, this energy makes sound. But if it was so, it will be isothermal. And Laplace told it was adiabatic. How can it be? I am confused. The heat energy infact is the energy given by the fork. If it is adiabatic, how can the air pass this energy ? Is there a difference between "Joe said" and "said Joe"? Does the subject/verb order make a difference when writing a dialog tag?  &quot;The sky is blue,&quot; Joe said. &quot;The sky is blue,&quot; said Joe.  Is one preferable over the other? Does one emphasize the speaker (or the method of speech, such as shout) more than the other? (Personally, I would use the second form to emphasize that Joe made the statement) After plain installation of Ubuntu 16.04 LTS gnome-software doesn't work. It has opened once with GUI, but installation of Unity Tweak Tool didn't finish.  When starting again, GUI doesn't come up. When opening from terminal, a warning appears, but the application GUI doesn't open.  $ gnome-software (gnome-software:7052): Gs-WARNING: failed to open plugin /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so: /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so: cannot open shared object file: No such file or directory   Does anybody have same experience, and eventually, a solution?    According to the recommendation:  $ dpkg-query -S /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so gnome-software: /usr/lib/gs-plugins-9/libgs_plugin_xdg_app_reviews.so   Proposed reinstall of gnome-software did not help.    As workaround, use Synaptic Package manager and command line. Possible Duplicate:          I sometimes work outside and are using a 3G usb connection with quite a limited data allowance.  I want some fast and easy way to temporary block all incoming and outgoing traffic in windows firewall except for chrome to be sure that Dropbox or something else is not using up my data.  I've tried to set Windows Firewall Properties to "Block" which gives "Outgoing/Incoming connections that do not match a rule are blocked".  Problem: There are many allow-rules like Dropbox that would "override" the block. And I don't want to disable all rules and then enable them, since there are some that I want disabled even when I get to the office...  Any suggestions?  Thanks! Avoiding Windows 10 Creator, but not other updates Can someone explain this trigonometric limit? I have $$\lim \limits_{x\to 0}  \frac {\tan(2x)}{\sin(x)}$$ and in my case the result is $\frac{2}{1}$ =2 not whether it is right.  This is my procedure.  $$\lim \limits_{x\to 0}  \frac{\frac {\sin(2x)}{\cos(2x)}}{\frac{\sin(x)}{1}}= \lim \limits_{x\to 0}  {\dfrac {\sin(2x)}{(\cos(2x))(\sin(x))}}=\dfrac{2x\frac {\sin(2x)}{2x}}{\cos(2x)\frac{x\sin(x)}{x}}$$  I separate the limit.  $$\frac{\left(\lim \limits_{x\to 0}2x\right) \cdot \left(\lim \limits_{x\to 0}\frac {\sin(2x)}{2x}\right)}{\lim \limits_{x\to 0}\left(\cos(2x)\right)\cdot\left(\lim \limits_{x\to 0}\frac{x\sin(x)}{x}\right)} = \lim \limits_{x\to 0} \dfrac{2x}{x}=\frac{2}{1} =2$$ I will have a 10 hour layover in Seoul (ICN) and I want to go out and do some shopping. Is it possible to check in a bag during my layover?  I will be traveling on Korean Air.  I will only have 1 checked bag, and international flights allow 2 bags free. Why does the Contains() operator degrade Entity Framework' Linq queries? Get tax deduction for expensive car expense Zooming in to inspect texture details in 3D view clips some closer faces like shown in the image. It's not the camera view so changing camera settings doesn't help.   Where can the distance to the clipping plane be adjusted? "Dummy Output" No sound in Ubuntu 16.04 None of the HDMI output are working, all saying "dummy output", it was working yesterday, but when I use the headphones it became soundless, with or without the headphones.  Thank you already! Proof that the relation $5 \mid (a + 4b)$ is symmetric and transitive There are $25$ horses. You can take $5$ horses at a time and race them. Each horse always finishes the race in the same amount of time, and there are no ties. The only information you get from each race is the order that the $5$ horses finished in. What is the smallest number of races you need to find the $3$ fastest horses, in order?   I found this problem on  and cannot figure out the best answer. Please help.