Dropbox核心API copy_ref显示(404)Not Found错误(Dropbox core API copy_ref showing (404) Not Found error)
我想将文件从Dropbox复制到另一个用户的Dropbox。 我正在调用Dropbox核心API v1 copy_ref来获取响应
RequestResult strReq = OAuthUtility.Get ( "https://api.dropboxapi.com/1/copy_ref/auto", new HttpParameterCollection { {"access_token", "AccessToken"}, {"path", Path.Combine("CurrentPath", "FileName").Replace("\\", "/")} } );
它显示错误“远程服务器返回错误:(404)Not Found”我无法找到错误发生的位置。
I want to copy a file from a dropbox to another user's Dropbox. I'm calling the Dropbox core API v1 copy_ref to get the response like
RequestResult strReq = OAuthUtility.Get ( "https://api.dropboxapi.com/1/copy_ref/auto", new HttpParameterCollection { {"access_token", "AccessToken"}, {"path", Path.Combine("CurrentPath", "FileName").Replace("\\", "/")} } );
It is showing me error "The remote server returned an error: (404) Not Found" I'm unable to find where is the mistake committed.
原文:https://stackoverflow.com/questions/37436497
最满意答案
看起来你从另一个答案复制了很多这段代码,但你遗漏了一个关键的步骤。 您似乎没有在任何帧上调用
pack
,place
或grid
。 你需要这样做才能让它们可见。It looks like you copied a lot of this code from another answer, but you left out a critical step. You don't seem to be calling
pack
,place
orgrid
on any of the frames. You'll need to do that for them to be visible.
相关问答
更多-
python:tkinter显示来自摄像头的视频并执行QR扫描(python: tkinter to display video from webcam and do a QR scan)[2022-11-28]
你的程序有两个线程,主线程和从摄像头读取帧的工作线程。 当关闭按钮被点击时,它发生在主线程中。 在self.cam.release() ,对象self.cam可能处于不可用状态,并且当工作线程调用self.cam的方法时,可能会遇到一些麻烦。 也许cv2.VideoCapture的实现有问题,并且在发生这种情况时应该抛出一些异常。 从主线程以外的其他线程访问tkinter小部件也可能导致问题。 对于干净的程序终止,创建一个threading.Event的实例,然后在工作线程中的某个时刻检查event.is_ ... -
tkinter的Tk和Toplevel类有什么区别?(What's the difference between tkinter's Tk and Toplevel classes?)[2022-08-10]
您的摘要是准确的。 tkinter的核心架构特征之一是这些小部件只存在于一个层次结构中,并且只有一个根窗口。 那个根窗口是你实例化Tk时得到的。 实例化Tk不仅仅是创建一个窗口,它初始化整个tkinter框架。 它实际上启动了一个隐藏的tcl解释器,它执行管理小部件的实际工作。 Tkinter只是这个解释器的python包装器。 如果您尝试创建其他小部件而不首先显式创建根窗口,则会自动创建一个小部件,因为每个tkinter应用程序必须只有一个根窗口。 Your summary is accurate. On ... -
使用Ubuntu .desktop文件从python脚本显示Tkinter窗口(Show Tkinter window from python script with Ubuntu .desktop file)[2022-05-09]
您可以在.desktop文件中添加StartupWMClass属性,该文件将从应用程序中标识它 运行以下命令并单击应用程序,它将输出窗口类 xprop | grep WM_CLASS | awk '{print $4}' 并把它像 StartupWMClass= -
虽然我没有告诉你的代码必须类似于下面的代码,因为相同的行为可以用不同的方式和风格来编写,但它会按照你的意愿去做。 我在代码中看到两个或三个基本错误。 您通过调用Tk()将主根窗口作为参数传递。 这是错误的,因为应该只有一个Tk实例,在tkinter程序中使用TK()调用创建。 给它一个像root这样的名字并使用它们的引用。 其次,你没有看到任何东西,因为你永远不会调用mainloop() ,否则你的程序不会更新UI,也不会响应事件。 主循环是Tk实例的tkinter的事件循环。 因此,使用所有小部件设置完整 ...
-
你的问题是调用Factorial_Calculation() ,你应该在类中调用它作为self.Factorial_Calculation()但是在类之外是另一回事。 在被调用函数前添加“ self. ”,因为它适用于您调用它的类,并从您调用它的类中提取定义。 Your problem is the calling of Factorial_Calculation(), you should call it within the class as self.Factorial_Calculation() b ...
-
你忘了在PageOne和PageTwo的标签中加入image=...选项。 我已经添加了它。 ;) 另外,删除了Toplevel。 或者,您仍然可以像使用Toplevel一样使用Toplevel,并在创建后隐藏root=tk.Tk()窗口。 #import tkinter as tk # python3 import Tkinter as tk # python from PIL import ImageTk, Image TITLE_FONT = ("Helvetica", 18, "bold" ...
-
我修改了你的例子,希望能够正确理解你想要达到的目标。 from tkinter import * from tkinter import ttk def win1(): mainframe = ttk.Frame(root, padding = '3 3 12 12') mainframe.grid(column = 0, row = 0, sticky = (N, W, E, S)) mainframe.columnconfigure(0, weight = 1) mai ...
-
Python:使用tkinter从剪贴板复制而不显示窗口(Python: copying from clipboard using tkinter without displaying window)[2023-06-14]
Window由tkinter.Tk() (或其他需要窗口的元素)而不是由tk().mainloop() 。 Mainloop保持程序工作。 也许尝试Pyperclip或剪贴板 Window is created by tkinter.Tk() (or other elements which need window) not by tk().mainloop(). Mainloop keeps program working. Maybe try Pyperclip or clipboard -
添加python tkinter窗口作为类,无法显示[关闭](Adding python tkinter windows as classes and can't get any to show [closed])[2023-06-18]
看起来你从另一个答案复制了很多这段代码,但你遗漏了一个关键的步骤。 您似乎没有在任何帧上调用pack , place或grid 。 你需要这样做才能让它们可见。 It looks like you copied a lot of this code from another answer, but you left out a critical step. You don't seem to be calling pack, place or grid on any of the frames. You'l ... -
在Linux上使用多处理时,不会出现TKinter窗口(TKinter windows do not appear when using multiprocessing on Linux)[2023-10-24]
这个讨论可能会有所帮助。 以下是我发现的一些示例问题: 虽然多处理模块紧跟线程,但它绝对不是完全匹配。 一个例子:由于进程的参数必须是可选择的 ,因此我不得不经历大量代码更改以避免传递Tkinter对象,因为这些对象不是可选择的 。 线程模块不会发生这种情况。 第一次尝试后, process.terminate()并不真正起作用。 第二次或第三次尝试只是挂起解释器,可能是因为数据结构已损坏(在API中提到,但这是一个小小的安慰)。 This discussion could be helpful. Here ...